]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/txd.c
avformat/mpegts: Fix indentation for stream_id constants
[ffmpeg] / libavcodec / txd.c
index 8b20475d3925dd9cba750775ec6b4c7eb7702f17..86d60f33777346a675f008a00ad81e3b7661b736 100644 (file)
@@ -43,6 +43,9 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     int i, j;
     int ret;
 
+    if (avpkt->size < 88)
+        return AVERROR_INVALIDDATA;
+
     ff_texturedsp_init(&dxtc);
 
     bytestream2_init(&gb, avpkt->data, avpkt->size);
@@ -152,7 +155,7 @@ unsupported:
     return AVERROR_PATCHWELCOME;
 }
 
-AVCodec ff_txd_decoder = {
+const AVCodec ff_txd_decoder = {
     .name           = "txd",
     .long_name      = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image"),
     .type           = AVMEDIA_TYPE_VIDEO,