diff options
author | Derek Buitenhuis | 2016-02-10 14:40:32 +0000 |
---|---|---|
committer | Derek Buitenhuis | 2016-02-10 14:42:41 +0000 |
commit | bc9a5965c815cf7fd998d8ce14a18b8e861dd9ce (patch) | |
tree | 7011642746984633573c9a2d993d58dfd12ee44b /libavformat/img2dec.c | |
parent | d94b11a721385aa406187da8f49380f29be0fa7e (diff) | |
parent | 9f61abc8111c7c43f49ca012e957a108b9cc7610 (diff) |
Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'
This also deprecates our old duplicated callbacks.
* commit '9f61abc8111c7c43f49ca012e957a108b9cc7610':
lavf: allow custom IO for all files
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r-- | libavformat/img2dec.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index efd637b310..c353563610 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -377,10 +377,6 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) int size[3] = { 0 }, ret[3] = { 0 }; AVIOContext *f[3] = { NULL }; AVCodecContext *codec = s1->streams[0]->codec; - AVOpenCallback open_func = s1->open_cb; - - if (!open_func) - open_func = ffio_open2_wrapper; if (!s->is_pipe) { /* loop over input */ @@ -407,8 +403,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) !s->loop && !s->split_planes) { f[i] = s1->pb; - } else if (open_func(s1, &f[i], filename, AVIO_FLAG_READ, - &s1->interrupt_callback, NULL) < 0) { + } else if (s1->io_open(s1, &f[i], filename, AVIO_FLAG_READ, NULL) < 0) { if (i >= 1) break; av_log(s1, AV_LOG_ERROR, "Could not open file : %s\n", @@ -496,7 +491,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) } } if (!s->is_pipe && f[i] != s1->pb) - avio_closep(&f[i]); + ff_format_io_close(s1, &f[i]); if (ret[i] > 0) pkt->size += ret[i]; } @@ -525,7 +520,7 @@ fail: if (!s->is_pipe) { for (i = 0; i < 3; i++) { if (f[i] != s1->pb) - avio_closep(&f[i]); + ff_format_io_close(s1, &f[i]); } } return res; |