diff options
author | Michael Niedermayer | 2016-01-20 02:35:56 +0100 |
---|---|---|
committer | Michael Niedermayer | 2016-01-20 21:21:31 +0100 |
commit | b750b67d13696fdbcd62ce7238eb2826f2be4686 (patch) | |
tree | 815d8863541d34cf13bc8e55226fdd400c2fcf32 /libavformat/img2dec.c | |
parent | 2cb8edea7c9af336f3fa60ac8a0f9b8a17e92188 (diff) |
avformat/img2dec: Use AVOpenCallback
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r-- | libavformat/img2dec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 0c448dc445..efd637b310 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -377,6 +377,10 @@ 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 */ @@ -403,7 +407,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) !s->loop && !s->split_planes) { f[i] = s1->pb; - } else if (avio_open2(&f[i], filename, AVIO_FLAG_READ, + } else if (open_func(s1, &f[i], filename, AVIO_FLAG_READ, &s1->interrupt_callback, NULL) < 0) { if (i >= 1) break; |