aboutsummaryrefslogtreecommitdiffstats
path: root/fftools
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-01-11 12:04:56 +0100
committerAnton Khirnov <anton@khirnov.net>2024-01-30 09:52:00 +0100
commit27de2aacd15c78015327cfcc7e890b25d5295b02 (patch)
treed86e81d7673f55d3c86a5eebcfabb3b4a4e8de78 /fftools
parent9be3f80527e2d5918825f1405b720d5f6dcb5e16 (diff)
downloadffmpeg-27de2aacd15c78015327cfcc7e890b25d5295b02.tar.gz
fftools/ffmpeg_dec: drop useless and racy code
Setting demuxer's video_delay from the decoder cannot accomplish anything meaningful and is racy, as they run in different threads.
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg_dec.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c
index 58be466e4c..e2d503f441 100644
--- a/fftools/ffmpeg_dec.c
+++ b/fftools/ffmpeg_dec.c
@@ -263,21 +263,6 @@ static int video_frame_process(InputStream *ist, AVFrame *frame)
{
DecoderPriv *dp = dp_from_dec(ist->decoder);
- // The following line may be required in some cases where there is no parser
- // or the parser does not has_b_frames correctly
- if (ist->par->video_delay < dp->dec_ctx->has_b_frames) {
- if (dp->dec_ctx->codec_id == AV_CODEC_ID_H264) {
- ist->par->video_delay = dp->dec_ctx->has_b_frames;
- } else
- av_log(dp->dec_ctx, AV_LOG_WARNING,
- "video_delay is larger in decoder than demuxer %d > %d.\n"
- "If you want to help, upload a sample "
- "of this file to https://streams.videolan.org/upload/ "
- "and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)\n",
- dp->dec_ctx->has_b_frames,
- ist->par->video_delay);
- }
-
if (dp->dec_ctx->width != frame->width ||
dp->dec_ctx->height != frame->height ||
dp->dec_ctx->pix_fmt != frame->format) {