[FFmpeg-devel] Patch for the ticket #3127 (Video stream publishing via RTMPT)

Michael Niedermayer michaelni at gmx.at
Sat Nov 16 02:45:44 CET 2013


On Fri, Nov 15, 2013 at 08:39:04PM +0100, Lukasz M wrote:
> On 15 November 2013 19:03, Valeriy Argunov <hzdbyte at gmail.com> wrote:
> 
> > I've found that "ffurl_read" can return 0 by the specification:
> >
> > /**
> >  * Read up to size bytes from the resource accessed by h, and store
> >  * the read bytes in buf.
> >  *
> >  * @return The number of bytes actually read, or a negative value
> >  * corresponding to an AVERROR code in case of error. A value of zero
> >  * indicates that it is not possible to read more from the accessed
> >  * resource (except if the value of the size argument is also zero).
> >  */
> > int ffurl_read(URLContext *h, unsigned char *buf, int size);
> >
> > So the right patch must check "ffurl_read" result on 0, and the old patch
> > is invalid.
> > Here is a new patch.
> 
> 
> I can't remember exactly what it was, but I was struggling similar problem
> implementing ftp protocol.
> System read function doesn't return error when reading beyond end of file
> but returns 0.
> You can even seek beyond end of file and after read you also get 0.
> This wrapper simulates this behavior and fix should be done in the protocol
> itself.
> 
> Second patch look OK for me.

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- 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/20131116/39b7d877/attachment.asc>


More information about the ffmpeg-devel mailing list