[FFmpeg-cvslog] vformat/subtitles: check av_copy_packets return code

Michael Niedermayer git at videolan.org
Fri Aug 30 21:45:28 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 30 20:57:04 2013 +0200| [5c504e4df7b4abe6e54d0be3e327b65348267906] | committer: Michael Niedermayer

vformat/subtitles: check av_copy_packets return code

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c504e4df7b4abe6e54d0be3e327b65348267906
---

 libavformat/subtitles.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c
index 2af0450..21d68a9 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++;



More information about the ffmpeg-cvslog mailing list