* [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_mux: fix terminating muxer on streamcopy with -t
@ 2024-02-03 20:39 Anton Khirnov
2024-02-03 20:39 ` [FFmpeg-devel] [PATCH 2/2] tests/fate/ffmpeg: add a test for the issue fixed in previous commit Anton Khirnov
0 siblings, 1 reply; 2+ messages in thread
From: Anton Khirnov @ 2024-02-03 20:39 UTC (permalink / raw)
To: ffmpeg-devel
Reported-by: Andreas Rheinhardt
---
fftools/ffmpeg_mux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index ab86abee14..962d0b2882 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -300,6 +300,7 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt,
av_packet_unref(pkt);
pkt = NULL;
ret = 0;
+ *stream_eof = 1;
} else if (ret < 0)
goto fail;
}
@@ -352,14 +353,13 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt,
goto mux_fail;
}
*stream_eof = 1;
- return AVERROR_EOF;
} else {
ret = sync_queue_process(mux, ms, pkt, stream_eof);
if (ret < 0)
goto mux_fail;
}
- return 0;
+ return *stream_eof ? AVERROR_EOF : 0;
mux_fail:
err_msg = "submitting a packet to the muxer";
--
2.42.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] tests/fate/ffmpeg: add a test for the issue fixed in previous commit
2024-02-03 20:39 [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_mux: fix terminating muxer on streamcopy with -t Anton Khirnov
@ 2024-02-03 20:39 ` Anton Khirnov
0 siblings, 0 replies; 2+ messages in thread
From: Anton Khirnov @ 2024-02-03 20:39 UTC (permalink / raw)
To: ffmpeg-devel
---
tests/fate/ffmpeg.mak | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak
index 8c2f008d04..3f21815ba2 100644
--- a/tests/fate/ffmpeg.mak
+++ b/tests/fate/ffmpeg.mak
@@ -271,3 +271,11 @@ fate-ffmpeg-filter-in-eof: CMD = framecrc
-f rawvideo -s 352x288 -pix_fmt yuv420p -t 1 -i $(TARGET_PATH)/tests/data/vsynth_lena.yuv \
-filter_complex "[0][1]concat" -c:v rawvideo
FATE_FFMPEG-$(call FRAMECRC, RAWVIDEO, RAWVIDEO, CONCAT_FILTER) += fate-ffmpeg-filter-in-eof
+
+# Test termination on streamcopy with -t as an output option.
+fate-ffmpeg-streamcopy-t: tests/data/vsynth_lena.yuv
+fate-ffmpeg-streamcopy-t: CMP = null
+fate-ffmpeg-streamcopy-t: CMD = ffmpeg \
+ -stream_loop -1 -f rawvideo -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth_lena.yuv \
+ -c copy -f null -t 1 -
+FATE_FFMPEG-$(call REMUX, RAWVIDEO) += fate-ffmpeg-streamcopy-t
--
2.42.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-03 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-03 20:39 [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_mux: fix terminating muxer on streamcopy with -t Anton Khirnov
2024-02-03 20:39 ` [FFmpeg-devel] [PATCH 2/2] tests/fate/ffmpeg: add a test for the issue fixed in previous commit Anton Khirnov
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git