|
|
|
@@ -264,8 +264,10 @@ static int img_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 (url_fopen(&f[i], filename, URL_RDONLY) < 0) |
|
|
|
if (url_fopen(&f[i], filename, URL_RDONLY) < 0) { |
|
|
|
av_log(s1, AV_LOG_ERROR, "Could not open file : %s\n",filename); |
|
|
|
return AVERROR(EIO); |
|
|
|
} |
|
|
|
size[i]= url_fsize(f[i]); |
|
|
|
|
|
|
|
if(codec->codec_id != CODEC_ID_RAWVIDEO) |
|
|
|
@@ -340,8 +342,10 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt) |
|
|
|
img->path, img->img_number) < 0 && img->img_number>1) |
|
|
|
return AVERROR(EIO); |
|
|
|
for(i=0; i<3; i++){ |
|
|
|
if (url_fopen(&pb[i], filename, URL_WRONLY) < 0) |
|
|
|
if (url_fopen(&pb[i], filename, URL_WRONLY) < 0) { |
|
|
|
av_log(s, AV_LOG_ERROR, "Could not open file : %s\n",filename); |
|
|
|
return AVERROR(EIO); |
|
|
|
} |
|
|
|
|
|
|
|
if(codec->codec_id != CODEC_ID_RAWVIDEO) |
|
|
|
break; |
|
|
|
|