diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-04 13:11:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-04 13:11:45 +0200 |
commit | 0f1446a4d010a1210c8b13562e83c9b157553764 (patch) | |
tree | d774ba3ebddf721dfac6357d8d958ce757a63fa3 /libavutil | |
parent | 741f5b021a0494676de0dab543f8a9591ec2e01e (diff) | |
parent | ab35ec29a4071871934856c00da7d6ebcc0c095b (diff) |
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')
-rw-r--r-- | libavutil/samplefmt.c | 5 | ||||
-rw-r--r-- | libavutil/samplefmt.h | 1 | ||||
-rw-r--r-- | libavutil/version.h | 2 |
3 files changed, 6 insertions, 2 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; } diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h index 2a7de202af..17300d1e95 100644 --- a/libavutil/samplefmt.h +++ b/libavutil/samplefmt.h @@ -194,6 +194,7 @@ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, * Allocate a samples buffer for nb_samples samples, and fill data pointers and * linesize accordingly. * The allocated samples buffer can be freed by using av_freep(&audio_data[0]) + * Allocated data will be initialized to silence. * * @see enum AVSampleFormat * The documentation for AVSampleFormat describes the data layout. diff --git a/libavutil/version.h b/libavutil/version.h index 3361069bdf..501d3cd2f5 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -40,7 +40,7 @@ #define LIBAVUTIL_VERSION_MAJOR 51 #define LIBAVUTIL_VERSION_MINOR 73 -#define LIBAVUTIL_VERSION_MICRO 101 +#define LIBAVUTIL_VERSION_MICRO 102 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ |