mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
mpeg4: only show the divx_packed warning, when a packed frame is present
Otherwise it is shown even after the file was fixed with avidemux, because the userdata string still ends with 'p'. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
6eb6956d06
commit
1f47c2399d
@@ -2077,12 +2077,6 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb)
|
|||||||
ctx->divx_version = ver;
|
ctx->divx_version = ver;
|
||||||
ctx->divx_build = build;
|
ctx->divx_build = build;
|
||||||
s->divx_packed = e == 3 && last == 'p';
|
s->divx_packed = e == 3 && last == 'p';
|
||||||
if (s->divx_packed && !ctx->showed_packed_warning) {
|
|
||||||
av_log(s->avctx, AV_LOG_INFO, "Video uses a non-standard and "
|
|
||||||
"wasteful way to store B-frames ('packed B-frames'). "
|
|
||||||
"Consider using a tool like VirtualDub or avidemux to fix it.\n");
|
|
||||||
ctx->showed_packed_warning = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* libavcodec detection */
|
/* libavcodec detection */
|
||||||
@@ -2667,6 +2661,12 @@ int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (startcode_found) {
|
if (startcode_found) {
|
||||||
|
if (!ctx->showed_packed_warning) {
|
||||||
|
av_log(s->avctx, AV_LOG_INFO, "Video uses a non-standard and "
|
||||||
|
"wasteful way to store B-frames ('packed B-frames'). "
|
||||||
|
"Consider using a tool like VirtualDub or avidemux to fix it.\n");
|
||||||
|
ctx->showed_packed_warning = 1;
|
||||||
|
}
|
||||||
av_fast_padded_malloc(&s->bitstream_buffer,
|
av_fast_padded_malloc(&s->bitstream_buffer,
|
||||||
&s->allocated_bitstream_buffer_size,
|
&s->allocated_bitstream_buffer_size,
|
||||||
buf_size - current_pos);
|
buf_size - current_pos);
|
||||||
|
|||||||
Reference in New Issue
Block a user