diff options
author | Jai Menon <jmenon86@gmail.com> | 2009-06-20 09:00:12 +0000 |
---|---|---|
committer | Jai Menon <jmenon86@gmail.com> | 2009-06-20 09:00:12 +0000 |
commit | 9ed3afcb7fe524dee315e800d17f94aa34b8d0b1 (patch) | |
tree | 7a6b463a9b2cb13dbacfb30f3a5d9d1d4601a7b0 | |
parent | 896f2b3212fb92471b1bdf198a1069ab63cba39f (diff) | |
download | ffmpeg-9ed3afcb7fe524dee315e800d17f94aa34b8d0b1.tar.gz |
Print meaningful error messages when url_fopen fails.
Originally committed as revision 19230 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/img2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index ad22d224bf..ec32f863e8 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -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; |