[FFmpeg-devel] [PATCH 2/3] vc1: always keep the BI frame type internal to vc1_parse_frame_header(_adv)
Hendrik Leppkes
h.leppkes at gmail.com
Sun Aug 19 20:34:08 CEST 2012
---
libavcodec/vc1.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 955dfa7..2e7fdcc 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -612,7 +612,7 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
skip_bits(gb, 7); // skip buffer fullness
if (v->parse_only)
- return 0;
+ goto done;
/* calculate RND */
if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)
@@ -795,6 +795,7 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
v->s.dc_table_index = get_bits1(gb);
}
+done:
if (v->s.pict_type == AV_PICTURE_TYPE_BI) {
v->s.pict_type = AV_PICTURE_TYPE_B;
v->bi_type = 1;
@@ -963,7 +964,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
v->use_ic = 0;
if (v->parse_only)
- return 0;
+ goto done;
switch (v->s.pict_type) {
case AV_PICTURE_TYPE_I:
@@ -1280,6 +1281,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
vop_dquant_decoding(v);
}
+done:
v->bi_type = 0;
if (v->s.pict_type == AV_PICTURE_TYPE_BI) {
v->s.pict_type = AV_PICTURE_TYPE_B;
--
1.7.10.msysgit.1
More information about the ffmpeg-devel
mailing list