[FFmpeg-devel] [PATCH] ffmpeg: make reading packets from thread blocking.
Michael Niedermayer
michaelni at gmx.at
Thu Feb 20 05:12:32 CET 2014
On Wed, Feb 19, 2014 at 04:48:14PM +0100, Nicolas George wrote:
> Le nonidi 9 brumaire, an CCXXII, Michael Niedermayer a écrit :
> > sadly not but i could reproduce it here again stuck in
> > fate-filter-amix-transition
> > but even running that 100 times shows no deadlock, seems it happens
> > only in a full fate run for me
> >
> > also from looking at the code i see that finished could get set
> > while the other thread is waiting, i didnt check if that would deadlock
> > though
>
> I believe that was the problem: I could produce a hang like the one
> described in this thread by adding a sleep() just before f->finished was
> set.
>
> Thanks for the testing and the analysis.
>
> > also iam not sure that fifo_cond should be reused
>
> I am convinced this use is correct: fifo_cond covers any change to fifo_size
> and finished.
>
> Here is an updated version of the patch. I ran FATE a couple of times, with
> various number of parallel processes and with and without the usleep(), and
> it did not hang.
>
> I suspect lavu could offer this kind of synchronized message passing queue,
> though, and it could be a bit cleaner, especially for error passing. Shall I
> propose something for that?
iam not sure, do we have more places where this would be needed?
>
> Regards,
>
> --
> Nicolas George
> ffmpeg.c | 20 ++++++++++++++++++--
> ffmpeg.h | 1 +
> 2 files changed, 19 insertions(+), 2 deletions(-)
> 1532139b4475592713b353f4f74d4be34e131426 0001-ffmpeg-make-reading-packets-from-thread-blocking.patch
> From 5893cf08736c0f6ebb1542afee72d6e6d66c70df Mon Sep 17 00:00:00 2001
> From: Nicolas George <george at nsup.org>
> Date: Fri, 25 Oct 2013 10:58:14 +0200
> Subject: [PATCH] ffmpeg: make reading packets from thread blocking.
LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140220/ad2bded8/attachment.asc>
More information about the ffmpeg-devel
mailing list