#9346: Loss of data when input is Unix Domain Socket -------------------------------------+------------------------------------ Reporter: ku7iex2E | Owner: (none) Type: defect | Status: open Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: unix-socket | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------ Comment (by dank074):
Replying to [comment:7 MasterQuestionable]: > ͏ Would it be alike the Pipe's IO? > ͏ https://trac.ffmpeg.org/ticket/11336#comment:1 Yes, it is similar, since ffmpeg expects the unix domain socket input to be seekable, hence why it attempts to read the beginning of the file twice, without taking into account that it is a consumable stream of data. I created a fix but I can't figure out how to mail the patch without the mailing server messing up the format. Setting `is_streamed` to true in the URLContext fixes unix domain socket inputs. {{{ --- libavformat/unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/unix.c b/libavformat/unix.c index 5704155cf0..2de4023835 100644 --- a/libavformat/unix.c +++ b/libavformat/unix.c @@ -89,7 +89,7 @@ static int unix_open(URLContext *h, const char *filename, int flags) } s->fd = fd; - + h->is_streamed = 1; return 0; fail: -- }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/9346#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
_______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org https://ffmpeg.org/mailman/listinfo/ffmpeg-trac To unsubscribe, visit link above, or email ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".