1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit 'ff7ffe48097f32417781fe8b2b417eff05a52c55'

* commit 'ff7ffe48097f32417781fe8b2b417eff05a52c55':
  mpeg4videodec: move showed_packed_warning from MpegEncContext to Mpeg4DecContext

Conflicts:
	libavcodec/mpeg4videodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-06 01:45:25 +01:00
commit cf948200bd
4 changed files with 5 additions and 4 deletions

View File

@ -92,6 +92,8 @@ typedef struct Mpeg4DecContext {
int divx_build; int divx_build;
int xvid_build; int xvid_build;
int lavc_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_i;
int cplx_estimation_trash_p; int cplx_estimation_trash_p;

View File

@ -120,7 +120,7 @@ static av_cold int mpeg4video_parse_init(AVCodecParserContext *s)
pc->first_picture = 1; pc->first_picture = 1;
pc->dec_ctx.m.quant_precision = 5; pc->dec_ctx.m.quant_precision = 5;
pc->dec_ctx.m.slice_context_count = 1; pc->dec_ctx.m.slice_context_count = 1;
pc->dec_ctx.m.showed_packed_warning = 1; pc->dec_ctx.showed_packed_warning = 1;
return 0; return 0;
} }

View File

@ -2065,11 +2065,11 @@ 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 && !s->showed_packed_warning) { if (s->divx_packed && !ctx->showed_packed_warning) {
av_log(s->avctx, AV_LOG_INFO, "Video uses a non-standard and " av_log(s->avctx, AV_LOG_INFO, "Video uses a non-standard and "
"wasteful way to store B-frames ('packed B-frames'). " "wasteful way to store B-frames ('packed B-frames'). "
"Consider using a tool like VirtualDub or avidemux to fix it.\n"); "Consider using a tool like VirtualDub or avidemux to fix it.\n");
s->showed_packed_warning = 1; ctx->showed_packed_warning = 1;
} }
} }

View File

@ -568,7 +568,6 @@ typedef struct MpegEncContext {
/* H.263 specific */ /* H.263 specific */
int gob_index; int gob_index;
int obmc; ///< overlapped block motion compensation 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 mb_info; ///< interval for outputting info about mb offsets as side data
int prev_mb_info, last_mb_info; int prev_mb_info, last_mb_info;
uint8_t *mb_info_ptr; uint8_t *mb_info_ptr;