projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb1f153
)
avformat/mxfdec: return error instead of segfaulting if there are no streams
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 31 May 2015 11:11:10 +0000
(13:11 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 2 Jun 2015 11:45:47 +0000
(13:45 +0200)
Fixes segfault from ticket 4350
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mxfdec.c
patch
|
blob
|
history
diff --git
a/libavformat/mxfdec.c
b/libavformat/mxfdec.c
index
c8f1c61
..
78e2393
100644
(file)
--- a/
libavformat/mxfdec.c
+++ b/
libavformat/mxfdec.c
@@
-2995,6
+2995,10
@@
static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
if (mxf->op != OPAtom)
return mxf_read_packet_old(s, pkt);
+ // If we have no streams then we basically are at EOF
+ if (s->nb_streams < 1)
+ return AVERROR_EOF;
+
/* OPAtom - clip wrapped demuxing */
/* NOTE: mxf_read_header() makes sure nb_index_tables > 0 for OPAtom */
st = s->streams[0];