summaryrefslogtreecommitdiff
path: root/libavutil/samplefmt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-04 13:11:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-04 13:11:45 +0200
commit0f1446a4d010a1210c8b13562e83c9b157553764 (patch)
treed774ba3ebddf721dfac6357d8d958ce757a63fa3 /libavutil/samplefmt.c
parent741f5b021a0494676de0dab543f8a9591ec2e01e (diff)
parentab35ec29a4071871934856c00da7d6ebcc0c095b (diff)
downloadffmpeg-0f1446a4d010a1210c8b13562e83c9b157553764.tar.gz
Merge commit 'ab35ec29a4071871934856c00da7d6ebcc0c095b'
* commit 'ab35ec29a4071871934856c00da7d6ebcc0c095b': vf_overlay: get rid of pointless messing with timebase. samplefmt: make av_samples_alloc() initialize the data to silence. libspeexdec: handle NULL return value from speex_packet_to_header() h264probe: Don't error out on bits that no longer are reserved mpegvideo: set extended_data in ff_update_duplicate_context() libspeexdec: properly handle DTX for multiple frames-per-packet libspeexdec: move the SpeexHeader from LibSpeexContext to where it is used libspeexdec: simplify setting of frame_size libspeexdec: set channel_layout Conflicts: libavfilter/vf_overlay.c libavformat/h264dec.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/samplefmt.c')
-rw-r--r--libavutil/samplefmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c
index a03648e200..96cc5fb24c 100644
--- a/libavutil/samplefmt.c
+++ b/libavutil/samplefmt.c
@@ -183,7 +183,7 @@ int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
if (size < 0)
return size;
- buf = av_mallocz(size);
+ buf = av_malloc(size);
if (!buf)
return AVERROR(ENOMEM);
@@ -193,6 +193,9 @@ int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
av_free(buf);
return size;
}
+
+ av_samples_set_silence(audio_data, 0, nb_samples, nb_channels, sample_fmt);
+
return 0;
}