diff mbox series

[FFmpeg-devel,1/3] lavc/decode: drop a useless warning

Message ID 20230509103041.5537-1-anton@khirnov.net
State Accepted
Commit 51d6ae099f281fecaab874037225b884eeb17794
Headers show
Series [FFmpeg-devel,1/3] lavc/decode: drop a useless warning | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov May 9, 2023, 10:30 a.m. UTC
Decoders will currently warn if an audio decoder not marked with
AV_CODEC_CAP_SUBFRAMES consumes less than the whole packet, but
* this happens for regular files
* this has no negative consequences
* there is no meeaningful action that can or should be taken in response

The warning is thus useless noise.
---
 libavcodec/decode.c   | 7 -------
 libavcodec/internal.h | 2 --
 2 files changed, 9 deletions(-)

Comments

Paul B Mahol May 9, 2023, 10:51 a.m. UTC | #1
Finally!
diff mbox series

Patch

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 4f2359f07e..360837a0ad 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -423,13 +423,6 @@  FF_ENABLE_DEPRECATION_WARNINGS
         }
     }
 
-    if (avctx->codec->type == AVMEDIA_TYPE_AUDIO &&
-        !avci->showed_multi_packet_warning &&
-        ret >= 0 && ret != pkt->size && !(avctx->codec->capabilities & AV_CODEC_CAP_SUBFRAMES)) {
-        av_log(avctx, AV_LOG_WARNING, "Multiple frames in a packet.\n");
-        avci->showed_multi_packet_warning = 1;
-    }
-
     if (!got_frame)
         av_frame_unref(frame);
 
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index a283c52e01..dceae182c0 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -148,8 +148,6 @@  typedef struct AVCodecInternal {
     AVFrame *buffer_frame;
     int draining_done;
 
-    int showed_multi_packet_warning;
-
     /* to prevent infinite loop on errors when draining */
     int nb_draining_errors;