summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-09-12 15:22:14 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-09-12 15:22:14 +0000
commitf3cfadd52f0b99b22db76a2875f6b1e55220c143 (patch)
treee3ec1f28276439453d69d9b14131dca673569a1c /libavcodec
parent33cbc6052a9ff9228cb11ff4dee0b65514a8f913 (diff)
downloadffmpeg-streaming-f3cfadd52f0b99b22db76a2875f6b1e55220c143.zip
ffmpeg-streaming-f3cfadd52f0b99b22db76a2875f6b1e55220c143.tar.gz
parsing resync header extension support
Originally committed as revision 931 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h263.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 90127e2..18f867b 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -2048,24 +2048,12 @@ static int decode_video_packet_header(MpegEncContext *s, GetBitContext *gb)
if(header_extension){
int time_increment;
int time_incr=0;
- printf("header extension not supported\n");
- return -1;
while (get_bits1(gb) != 0)
time_incr++;
check_marker(gb, "before time_increment in video packed header");
time_increment= get_bits(gb, s->time_increment_bits);
- if(s->pict_type!=B_TYPE){
- s->last_time_base= s->time_base;
- s->time_base+= time_incr;
- s->time= s->time_base*s->time_increment_resolution + time_increment;
- s->pp_time= s->time - s->last_non_b_time;
- s->last_non_b_time= s->time;
- }else{
- s->time= (s->last_time_base + time_incr)*s->time_increment_resolution + time_increment;
- s->bp_time= s->last_non_b_time - s->time;
- }
check_marker(gb, "before vop_coding_type in video packed header");
skip_bits(gb, 2); /* vop coding type */
@@ -2076,19 +2064,22 @@ static int decode_video_packet_header(MpegEncContext *s, GetBitContext *gb)
if(s->pict_type == S_TYPE && s->vol_sprite_usage==GMC_SPRITE && s->num_sprite_warping_points){
mpeg4_decode_sprite_trajectory(s);
+ fprintf(stderr, "untested\n");
}
//FIXME reduced res stuff here
if (s->pict_type != I_TYPE) {
- s->f_code = get_bits(gb, 3); /* fcode_for */
- if(s->f_code==0){
- printf("Error, video packet header damaged or not MPEG4 header (f_code=0)\n");
- return -1; // makes no sense to continue, as the MV decoding will break very quickly
+ int f_code = get_bits(gb, 3); /* fcode_for */
+ if(f_code==0){
+ printf("Error, video packet header damaged (f_code=0)\n");
}
}
if (s->pict_type == B_TYPE) {
- s->b_code = get_bits(gb, 3);
+ int b_code = get_bits(gb, 3);
+ if(b_code==0){
+ printf("Error, video packet header damaged (b_code=0)\n");
+ }
}
}
}
OpenPOWER on IntegriCloud