[FFmpeg-cvslog] avformat/utils: avformat_find_stream_info set value for ret in case of oom
Piotr Bandurski
git at videolan.org
Thu Jul 11 12:13:21 CEST 2013
ffmpeg | branch: release/2.0 | Piotr Bandurski <ami_stuff at o2.pl> | Wed Jul 10 14:57:15 2013 +0200| [c1c84f0a55f88ed25caa1e690aeeb5cf61204d3e] | committer: Michael Niedermayer
avformat/utils: avformat_find_stream_info set value for ret in case of oom
without it FFmpeg didn't display any error message when oom event occured
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit b0509563347b81d7b0a2474e56abbc9c99043688)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1c84f0a55f88ed25caa1e690aeeb5cf61204d3e
---
libavformat/utils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f607be7..bdee644 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2783,8 +2783,10 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
} else {
pkt = add_to_pktbuf(&ic->packet_buffer, &pkt1,
&ic->packet_buffer_end);
- if (!pkt)
+ if (!pkt) {
+ ret = AVERROR(ENOMEM);
goto find_stream_info_err;
+ }
if ((ret = av_dup_packet(pkt)) < 0)
goto find_stream_info_err;
}
More information about the ffmpeg-cvslog
mailing list