]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rawdec.c
cavsdec: check dimensions being valid.
[ffmpeg] / libavcodec / rawdec.c
index ba416db897f86edbcc2cf1246a212fe10421b901..e7c83032a036655e53f7e8ef54527140e9a199e4 100644 (file)
@@ -94,7 +94,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
 {
     RawVideoContext *context = avctx->priv_data;
 
-    if (avctx->codec_tag == MKTAG('r','a','w',' '))
+    if (avctx->codec_tag == MKTAG('r','a','w',' ') || avctx->codec_tag == MKTAG('N','O','1','6'))
         avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample);
     else if (avctx->codec_tag == MKTAG('W','R','A','W'))
         avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
@@ -272,7 +272,7 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx)
 AVCodec ff_rawvideo_decoder = {
     .name           = "rawvideo",
     .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = CODEC_ID_RAWVIDEO,
+    .id             = AV_CODEC_ID_RAWVIDEO,
     .priv_data_size = sizeof(RawVideoContext),
     .init           = raw_init_decoder,
     .close          = raw_close_decoder,