aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-10-14 12:21:54 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-10-14 12:21:54 +0000
commitb704e7420b2615d73aafd40a432b624c7272184c (patch)
tree856bc41358ba31d4ab5470b361da124cb7380402 /libavcodec/h263dec.c
parent26893f6bd433b01e30d7f81782ff1577a9b3491b (diff)
downloadffmpeg-b704e7420b2615d73aafd40a432b624c7272184c.tar.gz
mpeg4 header parser clenup (needed for parsing of VOL header in avctx->extradata)
Originally committed as revision 1032 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 5b7a9d2995..652907f0f1 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -40,8 +40,6 @@ static inline long long rdtsc()
}
#endif
-const UINT16 ff_mpeg4_resync_prefix[8];
-
static int h263_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
@@ -313,7 +311,14 @@ uint64_t time= rdtsc();
if (s->h263_msmpeg4) {
ret = msmpeg4_decode_picture_header(s);
} else if (s->h263_pred) {
- ret = mpeg4_decode_picture_header(s);
+ if(s->avctx->extradata_size && s->picture_number==0){
+ GetBitContext gb;
+
+ init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size);
+ ret = ff_mpeg4_decode_picture_header(s, &gb);
+ }
+ ret = ff_mpeg4_decode_picture_header(s, &s->gb);
+
s->has_b_frames= !s->low_delay;
} else if (s->h263_intel) {
ret = intel_h263_decode_picture_header(s);