]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/r3d.c
avcodec/mpc7: Don't pretend initializing static VLC tables can fail
[ffmpeg] / libavformat / r3d.c
index 7aa0c5a2c38d7327b2e9fa08bd9e731c80329eb7..606ed010d679fcb9d179aad1d0220969d67d3000 100644 (file)
@@ -56,6 +56,7 @@ static int r3d_read_red1(AVFormatContext *s)
     R3DContext *r3d = s->priv_data;
     char filename[258];
     int tmp;
+    int ret;
     int av_unused tmp2;
     AVRational framerate;
 
@@ -97,7 +98,9 @@ static int r3d_read_red1(AVFormatContext *s)
     r3d->audio_channels = avio_r8(s->pb); // audio channels
     av_log(s, AV_LOG_TRACE, "audio channels %d\n", tmp);
 
-    avio_read(s->pb, filename, 257);
+    ret = avio_read(s->pb, filename, 257);
+    if (ret < 257)
+        return ret < 0 ? ret : AVERROR_EOF;
     filename[sizeof(filename)-1] = 0;
     av_dict_set(&st->metadata, "filename", filename, 0);