summaryrefslogtreecommitdiff
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-27 15:07:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-27 15:07:49 +0100
commit102a2463d3a3f2c46f6ef9b30803491b91ffb653 (patch)
tree4ab276323a78be205592f7e6be10cf452cfd2e35 /libavformat/img2.c
parent47044625ba0829d10e48f8c205e2c976181de01a (diff)
downloadffmpeg-102a2463d3a3f2c46f6ef9b30803491b91ffb653.tar.gz
img2: Allow writing multiple files onto the same output file.
Fixes Ticket687 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index ff159ebf91..b5f88e0801 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -391,11 +391,10 @@ static int 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) {
- av_log(s, AV_LOG_ERROR,
- "Could not get frame filename number %d from pattern '%s'\n",
- img->img_number, img->path);
- return AVERROR(EINVAL);
+ img->path, img->img_number) < 0 && img->img_number==2) {
+ av_log(s, AV_LOG_WARNING,
+ "Writing multiple frames to the same file, check the pattern '%s' if this is not what you want\n",
+ img->path);
}
for(i=0; i<3; i++){
if (avio_open2(&pb[i], filename, AVIO_FLAG_WRITE,