summaryrefslogtreecommitdiff
path: root/libavformat/internal.h
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-11-08 10:35:14 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-11-08 10:35:14 +0100
commit4d7c71c36467331f1e0c0f17af9f371d33308a9c (patch)
tree9a0abce5245b3ffaef479b88b29b66587e72ee53 /libavformat/internal.h
parent8a3f976498cc096644b95ade7240a73e17d3a042 (diff)
Check for OOM after av_mallocz() in ff_interleave_add_packet().
Fixes a crash with the sample from Ubuntu bug #869125.
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r--libavformat/internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 582a2c8fe1..f15940cf4e 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -71,8 +71,9 @@ void ff_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i
/**
* Add packet to AVFormatContext->packet_buffer list, determining its
* interleaved position using compare() function argument.
+ * @return 0, or < 0 on error
*/
-void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
+int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
int (*compare)(AVFormatContext *, AVPacket *, AVPacket *));
void ff_read_frame_flush(AVFormatContext *s);