avformat/img2enc: Use AV_FRAME_FILENAME_FLAGS_MULTIPLE, support tee:
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 3 Aug 2016 18:36:14 +0000 (20:36 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 4 Aug 2016 21:22:54 +0000 (23:22 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/img2enc.c

index 32c68e4..1297b1a 100644 (file)
@@ -97,7 +97,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
                 av_log(s, AV_LOG_ERROR, "Could not get frame filename with strftime\n");
                 return AVERROR(EINVAL);
             }
-        } else if (av_get_frame_filename(filename, sizeof(filename), img->path, img->img_number) < 0 &&
+        } else if (av_get_frame_filename2(filename, sizeof(filename), img->path,
+                                          img->img_number,
+                                          AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0 &&
                    img->img_number > 1) {
             av_log(s, AV_LOG_ERROR,
                    "Could not get frame filename number %d from pattern '%s' (either set updatefirst or use a pattern like %%03d within the filename pattern)\n",