OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0e0e1e
)
ffmdec: check av_new_packet() return value
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 17 Oct 2012 18:45:59 +0000
(20:45 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 17 Oct 2012 18:45:59 +0000
(20:45 +0200)
Fixes CID733711
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/ffmdec.c
patch
|
blob
|
history
diff --git
a/libavformat/ffmdec.c
b/libavformat/ffmdec.c
index
d4e6056
..
028f1ee
100644
(file)
--- a/
libavformat/ffmdec.c
+++ b/
libavformat/ffmdec.c
@@
-386,7
+386,9
@@
static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
duration = AV_RB24(ffm->header + 5);
- av_new_packet(pkt, size);
+ if (av_new_packet(pkt, size) < 0) {
+ return AVERROR(ENOMEM);
+ }
pkt->stream_index = ffm->header[0];
if ((unsigned)pkt->stream_index >= s->nb_streams) {
av_log(s, AV_LOG_ERROR, "invalid stream index %d\n", pkt->stream_index);