summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2015-11-03 11:59:09 +0100
committerWim Taymans <wtaymans@redhat.com>2015-11-03 12:12:08 +0100
commit801f7ca4640cb5667f8936b6fe15b30f2bfa5baf (patch)
treeecccc5261b025d8546dfe46e9db8c786db189410 /gst
parent914aa4aed14738616d2d0f61d857977f10a0cb02 (diff)
audio-format: add TRUNCATE_RANGE flag
Add a TRUNCATE_RANGE flag for unpack functions to fill the least significate bits with 0 (as did the old code). Also add functions that don't truncate. Use the TRUNC flag in audioconvert for backwards compatibility for now.
Diffstat (limited to 'gst')
-rw-r--r--gst/audioconvert/audioconvert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/audioconvert/audioconvert.c b/gst/audioconvert/audioconvert.c
index a76e36674..5ca86d5f2 100644
--- a/gst/audioconvert/audioconvert.c
+++ b/gst/audioconvert/audioconvert.c
@@ -234,7 +234,8 @@ audio_convert_convert (AudioConvertCtx * ctx, gpointer src,
else
outbuf = tmpbuf;
- ctx->in.finfo->unpack_func (ctx->in.finfo, 0, outbuf, src,
+ ctx->in.finfo->unpack_func (ctx->in.finfo,
+ GST_AUDIO_PACK_FLAG_TRUNCATE_RANGE, outbuf, src,
samples * ctx->in.channels);
src = outbuf;
}