print error message when image2 muxer fail to compute frame filename
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 1 Dec 2009 23:10:32 +0000 (23:10 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 1 Dec 2009 23:10:32 +0000 (23:10 +0000)
Originally committed as revision 20694 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/img2.c

index b5a91cd..9fb8bc4 100644 (file)
@@ -343,8 +343,10 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt)
 
     if (!img->is_pipe) {
         if (av_get_frame_filename(filename, sizeof(filename),
-                                  img->path, img->img_number) < 0 && img->img_number>1)
+                                  img->path, img->img_number) < 0 && img->img_number>1) {
+            av_log(s, AV_LOG_ERROR, "Could not get frame filename from pattern\n");
             return AVERROR(EIO);
+        }
         for(i=0; i<3; i++){
             if (url_fopen(&pb[i], filename, URL_WRONLY) < 0) {
                 av_log(s, AV_LOG_ERROR, "Could not open file : %s\n",filename);