aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>2015-04-03 19:14:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-03 20:23:24 +0200
commit1f47c2399da2e814228f2526b09f8ab94acc7989 (patch)
tree8d1c5c3c0f1ec2c71b26ce2d32f5f0e1b18fce0a
parent6eb6956d067a0b515a78ebe19a4f3b5bd5482eea (diff)
downloadffmpeg-1f47c2399da2e814228f2526b09f8ab94acc7989.tar.gz
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>
-rw-r--r--libavcodec/mpeg4videodec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 4769dfdc52..80dfb91391 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2077,12 +2077,6 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb)
ctx->divx_version = ver;
ctx->divx_build = build;
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 */
@@ -2667,6 +2661,12 @@ int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
}
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,
&s->allocated_bitstream_buffer_size,
buf_size - current_pos);