Commit 23aaaeff authored by reimar's avatar reimar

Return AVERROR(ENOMEM) instead of -1 when malloc fails in url_open_dyn_buf_internal


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16636 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1df95d56
...@@ -794,7 +794,7 @@ static int url_open_dyn_buf_internal(ByteIOContext **s, int max_packet_size) ...@@ -794,7 +794,7 @@ static int url_open_dyn_buf_internal(ByteIOContext **s, int max_packet_size)
return -1; return -1;
d = av_mallocz(sizeof(DynBuffer) + io_buffer_size); d = av_mallocz(sizeof(DynBuffer) + io_buffer_size);
if (!d) if (!d)
return -1; return AVERROR(ENOMEM);
*s = av_mallocz(sizeof(ByteIOContext)); *s = av_mallocz(sizeof(ByteIOContext));
if(!*s) { if(!*s) {
av_free(d); av_free(d);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment