summaryrefslogtreecommitdiff
path: root/src/libffmpeg
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-09-05 17:08:18 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-09-05 17:08:18 +0000
commit792cd6f291ddbc5da430d2273c7d9d5fcb1a8681 (patch)
tree1f87fb4100b2cbddd8e6041d2e014c21444ce620 /src/libffmpeg
parent74e0dd85e141aec325cbf660775e1b40bc6ab338 (diff)
downloadxine-lib-792cd6f291ddbc5da430d2273c7d9d5fcb1a8681.tar.gz
xine-lib-792cd6f291ddbc5da430d2273c7d9d5fcb1a8681.tar.bz2
enable seeking in incomplete avis
CVS patchset: 568 CVS date: 2001/09/05 17:08:18
Diffstat (limited to 'src/libffmpeg')
-rw-r--r--src/libffmpeg/libavcodec/h263dec.c8
-rw-r--r--src/libffmpeg/libavcodec/mpegvideo.c3
-rw-r--r--src/libffmpeg/libavcodec/mpegvideo.h2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/h263dec.c b/src/libffmpeg/libavcodec/h263dec.c
index 758f9ed52..ec14c09e2 100644
--- a/src/libffmpeg/libavcodec/h263dec.c
+++ b/src/libffmpeg/libavcodec/h263dec.c
@@ -114,6 +114,14 @@ static int h263_decode_frame(AVCodecContext *avctx,
if (ret < 0)
return -1;
+ /* make sure we start with an I-frame */
+ if (s->waiting_for_keyframe) {
+ if (s->pict_type != I_TYPE)
+ return -1;
+ else
+ s->waiting_for_keyframe = 0;
+ }
+
MPV_frame_start(s);
#ifdef DEBUG
diff --git a/src/libffmpeg/libavcodec/mpegvideo.c b/src/libffmpeg/libavcodec/mpegvideo.c
index 5c66b3189..9f7236f98 100644
--- a/src/libffmpeg/libavcodec/mpegvideo.c
+++ b/src/libffmpeg/libavcodec/mpegvideo.c
@@ -101,6 +101,8 @@ int MPV_common_init(MpegEncContext *s)
int c_size, i;
UINT8 *pict;
+ s->waiting_for_keyframe = 1;
+
if (s->out_format == FMT_H263)
s->dct_unquantize = dct_unquantize_h263_c;
else
@@ -212,6 +214,7 @@ int MPV_common_init(MpegEncContext *s)
if (s->aux_picture_base[i])
free(s->aux_picture_base[i]);
}
+
return -1;
}
diff --git a/src/libffmpeg/libavcodec/mpegvideo.h b/src/libffmpeg/libavcodec/mpegvideo.h
index 31243471e..9abe75a7c 100644
--- a/src/libffmpeg/libavcodec/mpegvideo.h
+++ b/src/libffmpeg/libavcodec/mpegvideo.h
@@ -181,6 +181,8 @@ typedef struct MpegEncContext {
DCTELEM block[6][64] __align8;
void (*dct_unquantize)(struct MpegEncContext *s,
DCTELEM *block, int n, int qscale);
+
+ int waiting_for_keyframe;
} MpegEncContext;
int MPV_common_init(MpegEncContext *s);