aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/subtitles.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-30 20:57:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-30 21:36:58 +0200
commit5c504e4df7b4abe6e54d0be3e327b65348267906 (patch)
treedd80718ef38e4ceaad1491ff77ed3f7580d0ca8f /libavformat/subtitles.c
parentc04268447627e3845b5aea5432b502d457d959f4 (diff)
downloadffmpeg-5c504e4df7b4abe6e54d0be3e327b65348267906.tar.gz
vformat/subtitles: check av_copy_packets return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/subtitles.c')
-rw-r--r--libavformat/subtitles.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c
index 2af0450e86..21d68a9739 100644
--- a/libavformat/subtitles.c
+++ b/libavformat/subtitles.c
@@ -85,7 +85,9 @@ int ff_subtitles_queue_read_packet(FFDemuxSubtitlesQueue *q, AVPacket *pkt)
if (q->current_sub_idx == q->nb_subs)
return AVERROR_EOF;
- av_copy_packet(pkt, sub);
+ if (av_copy_packet(pkt, sub) < 0) {
+ return AVERROR(ENOMEM);
+ }
pkt->dts = pkt->pts;
q->current_sub_idx++;