aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-29 22:26:15 +0100
committerAnton Khirnov <anton@khirnov.net>2013-12-05 13:22:03 +0100
commita097f0049b28dc3ed13625e4a42619292c92492f (patch)
treedebbac1a9029bec669bacf1c2d0e705d983a0b6e /libavcodec
parentff300e435e5337b03dc7a8f1c0be6c9937059c1e (diff)
downloadffmpeg-a097f0049b28dc3ed13625e4a42619292c92492f.tar.gz
mpeg12dec: move first_slice from MpegEncContext to Mpeg1Context
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12dec.c7
-rw-r--r--libavcodec/mpegvideo.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 9d0c3be36a..cc652836b7 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -52,6 +52,7 @@ typedef struct Mpeg1Context {
AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
int closed_gop; ///< GOP is closed
+ int first_slice;
int extradata_decoded;
} Mpeg1Context;
@@ -2243,7 +2244,7 @@ static int decode_chunks(AVCodecContext *avctx,
/* we have a complete image: we try to decompress it */
if (mpeg1_decode_picture(avctx, buf_ptr, input_size) < 0)
s2->pict_type = 0;
- s2->first_slice = 1;
+ s->first_slice = 1;
last_code = PICTURE_START_CODE;
} else {
av_log(avctx, AV_LOG_ERROR, "ignoring pic after %X\n", last_code);
@@ -2353,9 +2354,9 @@ static int decode_chunks(AVCodecContext *avctx,
break;
}
- if (s2->first_slice) {
+ if (s->first_slice) {
skip_frame = 0;
- s2->first_slice = 0;
+ s->first_slice = 0;
if (mpeg_field_start(s2, buf, buf_size) < 0)
return -1;
}
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index bea71c3794..17aaf2f3ae 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -668,7 +668,6 @@ typedef struct MpegEncContext {
int progressive_frame;
int full_pel[2];
int interlaced_dct;
- int first_slice;
int first_field; ///< is 1 for the first field of a field picture 0 otherwise
int drop_frame_timecode; ///< timecode is in drop frame format.
int scan_offset; ///< reserve space for SVCD scan offset user data.