From 02beb9826b29166b5d7c9b306ac1648abb449be0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 27 Feb 2012 18:52:13 +0100 Subject: 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. --- libavcodec/mpeg12.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'libavcodec/mpeg12.c') 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; -- cgit v1.2.3