summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-02-27 18:52:13 +0100
committerAnton Khirnov <anton@khirnov.net>2012-03-04 21:02:45 +0100
commit02beb9826b29166b5d7c9b306ac1648abb449be0 (patch)
treec94871bf0201b0ca0dd73a1a1f07961e38edeee1 /libavcodec/mpeg12.c
parent87392b1fd5c59004b8e559463b47836e418d1d27 (diff)
lavc: deprecate AVCodecContext.sub_id.
In most places where it's used, it's as a pointless write-only field. Only rv10 decoder actually reads from it, but it stores some internal version info in it. There is no reason for it to be in a public field.
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index a5dafbd1fc..c49343f4b2 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1237,7 +1237,6 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
* that behave like P-frames. */
avctx->has_b_frames = !s->low_delay;
- assert((avctx->sub_id == 1) == (avctx->codec_id == CODEC_ID_MPEG1VIDEO));
if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) {
//MPEG-1 fps
avctx->time_base.den = avpriv_frame_rate_tab[s->frame_rate_index].num;
@@ -1382,7 +1381,6 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
av_dlog(s->avctx, "sequence extension\n");
s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;
- s->avctx->sub_id = 2; /* indicates MPEG-2 found */
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_DEBUG, "profile: %d, level: %d vbv buffer: %d, bitrate:%d\n",
@@ -2000,7 +1998,6 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s->frame_pred_frame_dct = 1;
s->chroma_format = 1;
s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG1VIDEO;
- avctx->sub_id = 1; /* indicates MPEG-1 */
s->out_format = FMT_MPEG1;
s->swap_uv = 0; // AFAIK VCR2 does not have SEQ_HEADER
if (s->flags & CODEC_FLAG_LOW_DELAY)
@@ -2060,7 +2057,6 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
s->frame_pred_frame_dct = 1;
s->chroma_format = 1;
s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;
- avctx->sub_id = 2; /* indicates MPEG-2 */
s1->save_width = s->width;
s1->save_height = s->height;
s1->save_progressive_seq = s->progressive_sequence;