[FFmpeg-cvslog] flacdec: don't call allocate_buffers() in init_thread_copy() when s-> max_blocksize is 0
Paul B Mahol
git at videolan.org
Thu Jun 6 03:08:58 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Jun 6 01:00:56 2013 +0000| [a28f4fd1ea45821100032403ebdac1c164b10007] | committer: Paul B Mahol
flacdec: don't call allocate_buffers() in init_thread_copy() when s->max_blocksize is 0
This is normal, and happens when no extradata was available at decoder
initialization.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a28f4fd1ea45821100032403ebdac1c164b10007
---
libavcodec/flacdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index a7303d6..22f6651 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -574,7 +574,9 @@ static int init_thread_copy(AVCodecContext *avctx)
FLACContext *s = avctx->priv_data;
s->decoded_buffer = NULL;
s->decoded_buffer_size = 0;
- return allocate_buffers(s);
+ if (s->max_blocksize)
+ return allocate_buffers(s);
+ return 0;
}
static av_cold int flac_decode_close(AVCodecContext *avctx)
More information about the ffmpeg-cvslog
mailing list