Commit d62cb297 authored by Paul B Mahol's avatar Paul B Mahol

avformat/vividas: check if viv->sb_pb is not NULL

parent e9909fe1
...@@ -582,6 +582,8 @@ static int viv_read_packet(AVFormatContext *s, ...@@ -582,6 +582,8 @@ static int viv_read_packet(AVFormatContext *s,
int64_t off; int64_t off;
int ret; int ret;
if (!viv->sb_pb)
return AVERROR(EIO);
if (avio_feof(viv->sb_pb)) if (avio_feof(viv->sb_pb))
return AVERROR_EOF; return AVERROR_EOF;
...@@ -615,6 +617,8 @@ static int viv_read_packet(AVFormatContext *s, ...@@ -615,6 +617,8 @@ static int viv_read_packet(AVFormatContext *s,
} }
pb = viv->sb_pb; pb = viv->sb_pb;
if (!pb)
return AVERROR(EIO);
off = avio_tell(pb); off = avio_tell(pb);
off += viv->sb_entries[viv->current_sb_entry].size; off += viv->sb_entries[viv->current_sb_entry].size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment