mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Remove superfluous setting of has_b_frames in codecs without B-frames.
patch by Nicholas Tung, ntung ntung com Originally committed as revision 8647 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d1e0d21f94
commit
587d07227e
@ -155,7 +155,6 @@ static int decode_init(AVCodecContext *avctx)
|
||||
EightBpsContext * const c = (EightBpsContext *)avctx->priv_data;
|
||||
|
||||
c->avctx = avctx;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
c->pic.data[0] = NULL;
|
||||
|
||||
|
@ -407,7 +407,6 @@ static int cinepak_decode_init(AVCodecContext *avctx)
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
}
|
||||
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
s->frame.data[0] = NULL;
|
||||
|
@ -218,7 +218,6 @@ static int decode_init(AVCodecContext *avctx) {
|
||||
if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
|
||||
return 1;
|
||||
}
|
||||
avctx->has_b_frames = 0;
|
||||
switch (avctx->bits_per_sample) {
|
||||
case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
|
||||
case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;
|
||||
|
@ -58,7 +58,6 @@ static int cyuv_decode_init(AVCodecContext *avctx)
|
||||
return -1;
|
||||
s->height = avctx->height;
|
||||
avctx->pix_fmt = PIX_FMT_YUV411P;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -93,7 +93,6 @@ static int cinvideo_decode_init(AVCodecContext *avctx)
|
||||
|
||||
cin->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
cin->frame.data[0] = NULL;
|
||||
|
||||
|
@ -95,7 +95,6 @@ static int flashsv_decode_init(AVCodecContext *avctx)
|
||||
return 1;
|
||||
}
|
||||
avctx->pix_fmt = PIX_FMT_BGR24;
|
||||
avctx->has_b_frames = 0;
|
||||
s->frame.data[0] = NULL;
|
||||
|
||||
return 0;
|
||||
|
@ -85,7 +85,6 @@ static int flic_decode_init(AVCodecContext *avctx)
|
||||
int depth;
|
||||
|
||||
s->avctx = avctx;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
s->fli_type = AV_RL16(&fli_header[4]); /* Might be overridden if a Magic Carpet FLC */
|
||||
depth = AV_RL16(&fli_header[12]);
|
||||
|
@ -73,7 +73,6 @@ static int decode_init(AVCodecContext *avctx)
|
||||
FrapsContext * const s = avctx->priv_data;
|
||||
|
||||
avctx->coded_frame = (AVFrame*)&s->frame;
|
||||
avctx->has_b_frames = 0;
|
||||
avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */
|
||||
|
||||
s->avctx = avctx;
|
||||
|
@ -155,7 +155,6 @@ static int idcin_decode_init(AVCodecContext *avctx)
|
||||
|
||||
s->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
/* make sure the Huffman tables make it */
|
||||
|
@ -1066,7 +1066,6 @@ static int indeo3_decode_init(AVCodecContext *avctx)
|
||||
s->width = avctx->width;
|
||||
s->height = avctx->height;
|
||||
avctx->pix_fmt = PIX_FMT_YUV410P;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
build_modpred(s);
|
||||
iv_alloc_frames(s);
|
||||
|
@ -865,7 +865,6 @@ static int ipvideo_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
/* decoding map contains 4 bits of information per 8x8 block */
|
||||
|
@ -624,7 +624,6 @@ static int decode_init(AVCodecContext *avctx)
|
||||
int zret; // Zlib return code
|
||||
|
||||
c->avctx = avctx;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
c->pic.data[0] = NULL;
|
||||
|
||||
|
@ -59,7 +59,6 @@ static int mm_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
if (avcodec_check_dimensions(avctx, avctx->width, avctx->height))
|
||||
return -1;
|
||||
|
@ -244,7 +244,6 @@ static int msrle_decode_init(AVCodecContext *avctx)
|
||||
s->avctx = avctx;
|
||||
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
s->frame.data[0] = NULL;
|
||||
|
||||
return 0;
|
||||
|
@ -76,7 +76,6 @@ static int msvideo1_decode_init(AVCodecContext *avctx)
|
||||
avctx->pix_fmt = PIX_FMT_RGB555;
|
||||
}
|
||||
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
s->frame.data[0] = NULL;
|
||||
|
@ -176,7 +176,6 @@ static int decode_init(AVCodecContext *avctx) {
|
||||
if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
|
||||
return 1;
|
||||
}
|
||||
avctx->has_b_frames = 0;
|
||||
avctx->pix_fmt = PIX_FMT_YUV420P;
|
||||
c->pic.data[0] = NULL;
|
||||
c->width = avctx->width;
|
||||
|
@ -523,7 +523,6 @@ static int qtrle_decode_init(AVCodecContext *avctx)
|
||||
avctx->bits_per_sample);
|
||||
break;
|
||||
}
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
s->frame.data[0] = NULL;
|
||||
|
@ -411,7 +411,6 @@ static int roq_decode_init(AVCodecContext *avctx)
|
||||
s->last_frame = &s->frames[0];
|
||||
s->current_frame = &s->frames[1];
|
||||
avctx->pix_fmt = PIX_FMT_YUV420P;
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
uiclp = uiclip+512;
|
||||
|
@ -236,7 +236,6 @@ static int rpza_decode_init(AVCodecContext *avctx)
|
||||
|
||||
s->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_RGB555;
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
s->frame.data[0] = NULL;
|
||||
|
@ -518,7 +518,6 @@ static int decode_init(AVCodecContext *avctx)
|
||||
SmackVContext * const c = (SmackVContext *)avctx->priv_data;
|
||||
|
||||
c->avctx = avctx;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
c->pic.data[0] = NULL;
|
||||
|
||||
|
@ -436,7 +436,6 @@ static int smc_decode_init(AVCodecContext *avctx)
|
||||
|
||||
s->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
s->frame.data[0] = NULL;
|
||||
|
@ -180,7 +180,6 @@ static int seqvideo_decode_init(AVCodecContext *avctx)
|
||||
|
||||
seq->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
seq->frame.data[0] = NULL;
|
||||
|
||||
|
@ -475,7 +475,6 @@ static int truemotion1_decode_init(AVCodecContext *avctx)
|
||||
// else
|
||||
// avctx->pix_fmt = PIX_FMT_RGB555;
|
||||
|
||||
avctx->has_b_frames = 0;
|
||||
s->frame.data[0] = s->prev_frame.data[0] = NULL;
|
||||
|
||||
/* there is a vertical predictor for each pixel in a line; each vertical
|
||||
|
@ -328,7 +328,6 @@ static int vmdvideo_decode_init(AVCodecContext *avctx)
|
||||
|
||||
s->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
/* make sure the VMD header made it */
|
||||
|
@ -1955,7 +1955,6 @@ static int vp3_decode_init(AVCodecContext *avctx)
|
||||
s->width = (avctx->width + 15) & 0xFFFFFFF0;
|
||||
s->height = (avctx->height + 15) & 0xFFFFFFF0;
|
||||
avctx->pix_fmt = PIX_FMT_YUV420P;
|
||||
avctx->has_b_frames = 0;
|
||||
if(avctx->idct_algo==FF_IDCT_AUTO)
|
||||
avctx->idct_algo=FF_IDCT_VP3;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
@ -139,7 +139,6 @@ static int vqa_decode_init(AVCodecContext *avctx)
|
||||
|
||||
s->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
/* make sure the extradata made it */
|
||||
|
@ -70,7 +70,6 @@ static int xan_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
avctx->has_b_frames = 0;
|
||||
|
||||
if(avcodec_check_dimensions(avctx, avctx->width, avctx->height))
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user