[FFmpeg-devel] [PATCH] RTSP-MS 14/15: ASF packet parsing
Thu Apr 23 21:45:50 CEST 2009
On Thu, Apr 23, 2009 at 10:23:01PM +0200, Luca Abeni wrote:
> Hi Michael
> Michael Niedermayer wrote:
>>> I think Luca is suggesting I go fix that so that the demuxer works
>> and my question was how?
>> and dont say you write a test app ;)
>> there are 17 get_byte, 3 get_buffer and 101 get_le* in asfdec.c
>> each could fail with EAGAIN in case of a non blocking pipe
> I warned you I was going to say something stupid ;-)
> Anyway my idea was that when a demuxer sees EAGAIN it saves the partial
> frame/packet/whatever in a buffer and then propagates EAGAIN to the
> application. When the application calls read_frame() again, the demuxer
> tries to read again and then restart parsing the frame (using the partial
> buffer saved previously).
> This is also what the RTP thing can do to interface with the ASF demuxer :)
> Anyway it was just a random idea... Please ignore it if it does not make
I think this would be too complex to do at 121 places
ronalds idea of making sure there is enough data before each part might
be doable but it as well might also end up too complex and it has
some special cases like when that amount is too big ...
anyway what is wrong with my 1 line solution?
that is check for EAGAIN after reading the first byte of a packet.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel