mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vp3dec: fix null ptr derefernce.
Fixes ticket1403 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5015c37b7d
commit
1125606a1f
@ -1667,7 +1667,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
|
|||||||
s->avctx = avctx;
|
s->avctx = avctx;
|
||||||
s->width = FFALIGN(avctx->width, 16);
|
s->width = FFALIGN(avctx->width, 16);
|
||||||
s->height = FFALIGN(avctx->height, 16);
|
s->height = FFALIGN(avctx->height, 16);
|
||||||
if (avctx->pix_fmt == PIX_FMT_NONE)
|
if (avctx->codec_id != CODEC_ID_THEORA)
|
||||||
avctx->pix_fmt = PIX_FMT_YUV420P;
|
avctx->pix_fmt = PIX_FMT_YUV420P;
|
||||||
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
|
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
|
||||||
if(avctx->idct_algo==FF_IDCT_AUTO)
|
if(avctx->idct_algo==FF_IDCT_AUTO)
|
||||||
@ -2315,6 +2315,8 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
|
|||||||
int header_len[3];
|
int header_len[3];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
avctx->pix_fmt = PIX_FMT_YUV420P;
|
||||||
|
|
||||||
s->theora = 1;
|
s->theora = 1;
|
||||||
|
|
||||||
if (!avctx->extradata_size)
|
if (!avctx->extradata_size)
|
||||||
|
Loading…
Reference in New Issue
Block a user