diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-16 19:40:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-16 19:43:35 +0200 |
commit | 15285d8fc528483aebf4ae7c522ea33c558f503c (patch) | |
tree | 0c6e05a3593224ab22b88d2ab5d979e4f608d8f6 /libavformat/aviobuf.c | |
parent | c31a5b23b4cd566724743685e5ea158b0c818647 (diff) | |
parent | 8342a82680966055af8cbc48e0ad129411df7c44 (diff) | |
download | ffmpeg-15285d8fc528483aebf4ae7c522ea33c558f503c.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
arm: remove disabled function dct_unquantize_h263_inter_iwmmxt()
Remove commented-out call to non-existing function print_pow1().
Do not decode RV30 files if the extradata is too small
flashsv: split flashsv_decode_block() off from flashsv_decode_frame().
ppc: remove disabled code
libspeexdec: Drop const qualifier to silence compiler warning.
libopenjpeg: Drop const qualifier to silence compiler warning.
alac: Remove unused dummy code.
Remove unused structs and tables.
vaapi: do not assert on value read from input bitstream
flashsvenc: replace bitstream description by a link to the specification
flashsvenc: drop unnecessary cast
flashsvenc: improve some variable names and fix corresponding comments
flashsvenc: merge two consecutive if-conditions
flashsvenc: merge variable declarations and initializations
flashsvenc: convert some debug av_log() to av_dlog()
flashsvenc: whitespace cosmetics
flashsvenc: drop some unnecessary parentheses
flashsvenc: fix some comment typos
aacps: skip some memcpy() if src and dst would be equal
...
Conflicts:
libavcodec/vaapi_mpeg2.c
libavformat/aviobuf.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index aad0240d53..e943aacb32 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -847,19 +847,13 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) if (!buffer) return AVERROR(ENOMEM); - *s = av_mallocz(sizeof(AVIOContext)); - if(!*s) { + *s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, + ffurl_read, ffurl_write, ffurl_seek); + if (!*s) { av_free(buffer); return AVERROR(ENOMEM); } - if (ffio_init_context(*s, buffer, buffer_size, - h->flags & AVIO_FLAG_WRITE, h, - (void*)ffurl_read, (void*)ffurl_write, (void*)ffurl_seek) < 0) { - av_free(buffer); - av_freep(s); - return AVERROR(EIO); - } #if FF_API_OLD_AVIO (*s)->is_streamed = h->is_streamed; #endif |