[FFmpeg-cvslog] avcodec/flacdec: Don't infer max_framesize unnecessarily

Andreas Rheinhardt git at videolan.org
Fri Sep 2 12:59:58 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Aug 28 15:01:34 2022 +0200| [ff1f5b407df8e8740eb6eeee83b202284f6ace7a] | committer: Andreas Rheinhardt

avcodec/flacdec: Don't infer max_framesize unnecessarily

This field is not really used by the decoder at all:
It is only output in some debug log message, but this debug
log message should better use the value read from the streaminfo
instead of a second-guessed value from the decoder.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff1f5b407df8e8740eb6eeee83b202284f6ace7a
---

 libavcodec/flacdec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index d03369eb6d..3b16426e73 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -565,12 +565,6 @@ static int flac_decode_frame(AVCodecContext *avctx, AVFrame *frame,
 
     *got_frame_ptr = 0;
 
-    if (s->stream_info.max_framesize == 0) {
-        s->stream_info.max_framesize =
-            ff_flac_get_max_frame_size(s->stream_info.max_blocksize ? s->stream_info.max_blocksize : FLAC_MAX_BLOCKSIZE,
-                                       FLAC_MAX_CHANNELS, 32);
-    }
-
     if (buf_size > 5 && !memcmp(buf, "\177FLAC", 5)) {
         av_log(s->avctx, AV_LOG_DEBUG, "skipping flac header packet 1\n");
         return buf_size;



More information about the ffmpeg-cvslog mailing list