[FFmpeg-devel] [PATCH/RFC] Detecting EOF in RTMP

Kostya kostya.shishkov
Thu Dec 10 17:10:20 CET 2009


On Thu, Dec 10, 2009 at 05:48:03PM +0200, Martin Storsj? wrote:
> On Thu, 10 Dec 2009, Kostya wrote:
> 
> > Looks OK, if someone can test it does not have regressions against
> > unpatched code on RTMP streams from
> > http://wiki.multimedia.cx/index.php?title=RTMP
> > then he can apply it, otherwise I'll do that tomorrow.
> 
> Ok, great!
> 
> Would it btw be good to add a
> 
> if (rt->state == STATE_STOPPED)
>     return AVERROR_EOF;
> 
> to the beginning of get_packet? Otherwise an extra call to get_packet 
> after receiving the EOF could trigger reading another rtmp packet, which 
> could block (almost) indefinitely?

Yes, it's a bit paranoid but could guard against misuses.
 
> // Martin



More information about the ffmpeg-devel mailing list