On Wed, 15 May 2013, Luca Barbato wrote:
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 25e3579..adc75e3 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -825,6 +825,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v,
GetBitContext* gb)
int status;
int mbmodetab, imvtab, icbptab, twomvbptab, fourmvbptab; /* useful only
for debugging */
int scale, shift, i; /* for initializing LUT for intensity compensation */
+ int field_mode, fcm;
v->p_frame_skipped = 0;
if (v->second_field) {
@@ -836,19 +837,23 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v,
GetBitContext* gb)
goto parse_common_info;
}
- v->field_mode = 0;
+ field_mode = 0;
if (v->interlace) {
- v->fcm = decode012(gb);
- if (v->fcm) {
- if (v->fcm == ILACE_FIELD)
- v->field_mode = 1;
+ fcm = decode012(gb);
+ if (fcm) {
+ if (fcm == ILACE_FIELD)
+ field_mode = 1;
if (!v->warn_interlaced++)
av_log(v->s.avctx, AV_LOG_ERROR,
"Interlaced frames/fields support is incomplete\n");
}
} else {
- v->fcm = PROGRESSIVE;
+ fcm = PROGRESSIVE;
}
+ if (!v->first_pic_header_flag && v->field_mode != field_mode)
A message such as
av_log(v->s.avctx, AV_LOG_ERROR, "Switching field mode is not supported\n");
+ return -1;
return AVERROR(ENOSYS); (or patch welcome)
Changed to AVERROR_INVALIDDATA, but didn't add any error message, since
this isn't supposed to be supported.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel