summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-04-27 19:13:25 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-05-22 15:34:39 +0100
commit848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42 (patch)
treee02dd312ec6d21fb183d1fda8172758156594e05 /libavcodec/mpeg12dec.c
parent29216d7fd14d1cec16821867d17c90b5c49e8c07 (diff)
mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 6ed151aae4..c6847ec109 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -823,7 +823,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif /* FF_API_XVMC */
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
- if (s->flags2 & CODEC_FLAG2_FAST) {
+ if (s->avctx->flags2 & CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++)
mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i);
} else {
@@ -1041,7 +1041,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif /* FF_API_XVMC */
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
- if (s->flags2 & CODEC_FLAG2_FAST) {
+ if (s->avctx->flags2 & CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++) {
if (cbp & 32)
mpeg2_fast_decode_block_non_intra(s, *s->pblocks[i], i);
@@ -1063,7 +1063,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
}
} else {
- if (s->flags2 & CODEC_FLAG2_FAST) {
+ if (s->avctx->flags2 & CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++) {
if (cbp & 32)
mpeg1_fast_decode_block_inter(s, *s->pblocks[i], i);
@@ -1102,8 +1102,6 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
ff_mpv_decode_defaults(s2);
s->mpeg_enc_ctx.avctx = avctx;
- s->mpeg_enc_ctx.flags = avctx->flags;
- s->mpeg_enc_ctx.flags2 = avctx->flags2;
/* we need some permutation to store matrices,
* until the decoder sets the real permutation. */
@@ -1403,7 +1401,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10;
s->low_delay = get_bits1(&s->gb);
- if (s->flags & CODEC_FLAG_LOW_DELAY)
+ if (s->avctx->flags & CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
s1->frame_rate_ext.num = get_bits(&s->gb, 2) + 1;
@@ -2134,7 +2132,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s->codec_id =
s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
s->out_format = FMT_MPEG1;
- if (s->flags & CODEC_FLAG_LOW_DELAY)
+ if (s->avctx->flags & CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
@@ -2633,7 +2631,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, void *data,
return buf_size;
}
- if (s2->flags & CODEC_FLAG_TRUNCATED) {
+ if (s2->avctx->flags & CODEC_FLAG_TRUNCATED) {
int next = ff_mpeg1_find_frame_end(&s2->parse_context, buf,
buf_size, NULL);