[FFmpeg-cvslog] mpeg4videodec: move showed_packed_warning from MpegEncContext to Mpeg4DecContext
Anton Khirnov
git at videolan.org
Fri Dec 6 01:53:21 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Nov 29 22:26:15 2013 +0100| [ff7ffe48097f32417781fe8b2b417eff05a52c55] | committer: Anton Khirnov
mpeg4videodec: move showed_packed_warning from MpegEncContext to Mpeg4DecContext
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff7ffe48097f32417781fe8b2b417eff05a52c55
---
libavcodec/mpeg4video.h | 2 ++
libavcodec/mpeg4videodec.c | 4 ++--
libavcodec/mpegvideo.h | 1 -
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h
index 9e1c8d9..59358eb 100644
--- a/libavcodec/mpeg4video.h
+++ b/libavcodec/mpeg4video.h
@@ -92,6 +92,8 @@ typedef struct Mpeg4DecContext {
int divx_build;
int xvid_build;
int lavc_build;
+ ///< flag for having shown the warning about divxs invalid b frames
+ int showed_packed_warning;
int cplx_estimation_trash_i;
int cplx_estimation_trash_p;
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 4f912ed..0e41548 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2016,10 +2016,10 @@ 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 && !s->showed_packed_warning) {
+ if (s->divx_packed && !ctx->showed_packed_warning) {
av_log(s->avctx, AV_LOG_WARNING,
"Invalid and inefficient vfw-avi packed B frames detected\n");
- s->showed_packed_warning = 1;
+ ctx->showed_packed_warning = 1;
}
}
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 76e84b5..ae6118f 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -553,7 +553,6 @@ typedef struct MpegEncContext {
/* H.263 specific */
int gob_index;
int obmc; ///< overlapped block motion compensation
- int showed_packed_warning; ///< flag for having shown the warning about divxs invalid b frames
int mb_info; ///< interval for outputting info about mb offsets as side data
int prev_mb_info, last_mb_info;
uint8_t *mb_info_ptr;
More information about the ffmpeg-cvslog
mailing list