diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-12 21:39:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-12 21:39:38 +0100 |
commit | 0d0f76ea56975e5ecf536c59d455963d0f6742c4 (patch) | |
tree | d0a3cb5d8b15d61428382104a8084a7b7a6cc028 /libavcodec | |
parent | d64b8540751bf8debab4ebcfad6ff87c61d3c19d (diff) | |
parent | 6327c10702922eabcb1c6170abd3f03d23ce4c51 (diff) | |
download | ffmpeg-0d0f76ea56975e5ecf536c59d455963d0f6742c4.tar.gz |
Merge commit '6327c10702922eabcb1c6170abd3f03d23ce4c51'
* commit '6327c10702922eabcb1c6170abd3f03d23ce4c51':
atomic: fix CAS with armcc.
png: use av_mallocz_array() for the zlib zalloc function
libmp3lame: use the correct remaining buffer size when flushing
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libmp3lame.c | 2 | ||||
-rw-r--r-- | libavcodec/png.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index e60856c10b..19f88abf7f 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -218,7 +218,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } } else { lame_result = lame_encode_flush(s->gfp, s->buffer + s->buffer_index, - BUFFER_SIZE - s->buffer_index); + s->buffer_size - s->buffer_index); } if (lame_result < 0) { if (lame_result == -1) { diff --git a/libavcodec/png.c b/libavcodec/png.c index a4287bd7e2..b398d91000 100644 --- a/libavcodec/png.c +++ b/libavcodec/png.c @@ -38,9 +38,7 @@ static const uint8_t ff_png_pass_xshift[NB_PASSES] = { void *ff_png_zalloc(void *opaque, unsigned int items, unsigned int size) { - if(items >= UINT_MAX / size) - return NULL; - return av_malloc(items * size); + return av_mallocz_array(items, size); } void ff_png_zfree(void *opaque, void *ptr) |