aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-17 19:50:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-17 19:50:58 +0200
commit1125606a1f8bdcabbdd9107831d20e86f0dfeeae (patch)
treea59e3aea82d853bf585c3d895d7081d3f8b4a453 /libavcodec
parent5015c37b7d7db1450e47a7f77e060bfc7b216172 (diff)
downloadffmpeg-1125606a1f8bdcabbdd9107831d20e86f0dfeeae.tar.gz
vp3dec: fix null ptr derefernce.
Fixes ticket1403 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 923ddfb7ac..81f6b8925c 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1667,7 +1667,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
s->width = FFALIGN(avctx->width, 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->chroma_sample_location = AVCHROMA_LOC_CENTER;
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 i;
+ avctx->pix_fmt = PIX_FMT_YUV420P;
+
s->theora = 1;
if (!avctx->extradata_size)