summaryrefslogtreecommitdiff
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-11-06 23:11:29 +0200
committerAnton Khirnov <anton@khirnov.net>2011-11-13 13:20:49 +0100
commit9d77a8faf9568f02daf06903559473efb4050c34 (patch)
tree1cb114b4b834a7a5ba94665f13971ca821973d69 /libavformat/img2.c
parent1dee0aca7401fc6c01f23ceedaff6533efb0fb28 (diff)
avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 25c3f7656a..547f23fe0a 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -304,7 +304,8 @@ static int read_packet(AVFormatContext *s1, AVPacket *pkt)
s->path, s->img_number)<0 && s->img_number > 1)
return AVERROR(EIO);
for(i=0; i<3; i++){
- if (avio_open(&f[i], filename, AVIO_FLAG_READ) < 0) {
+ if (avio_open2(&f[i], filename, AVIO_FLAG_READ,
+ &s1->interrupt_callback, NULL) < 0) {
if(i==1)
break;
av_log(s1, AV_LOG_ERROR, "Could not open file : %s\n",filename);
@@ -388,7 +389,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EIO);
}
for(i=0; i<3; i++){
- if (avio_open(&pb[i], filename, AVIO_FLAG_WRITE) < 0) {
+ if (avio_open2(&pb[i], filename, AVIO_FLAG_WRITE,
+ &s->interrupt_callback, NULL) < 0) {
av_log(s, AV_LOG_ERROR, "Could not open file : %s\n",filename);
return AVERROR(EIO);
}