[FFmpeg-devel] [PATCH 2/6] RTMP output: small fixes

Kostya kostya.shishkov
Thu Dec 3 18:15:25 CET 2009


On Thu, Dec 03, 2009 at 06:47:50PM +0200, Sergiy wrote:
> 2009/12/3 Kostya <kostya.shishkov at gmail.com>:
> 
> >> + ? ? ? ? ? ? ? ? ? ?gen_play(s, rt);
> >> + ? ? ? ? ? ? ? ? ? ?rt->state = STATE_READY;
> >> ? ? ? ? ? ? ? ? ?}
> >> - ? ? ? ? ? ? ? ?gen_play(s, rt);
> >> - ? ? ? ? ? ? ? ?rt->state = STATE_READY;
> >> ? ? ? ? ? ? ? ? ?break;
> >
> > Why?
> 
> When ffmpeg is in STATE_CONNECTING, red5 generates 2 RTMP_PT_INVOKE
> with "_result", in first pkt we have NULL instead of main_channel_id,
> in the second packet we have this id. This changes just skip packet
> with null.

Probably that means there was some invoke sent before connect. If yes,
just add another state for it, if no - complain to Red5 devs. While it's
written in Java, they should not be that evil.
 
> >> ? ? ? ? ? ? ?for (i = 0; i < 2; i++) {
> >> ? ? ? ? ? ? ? ? ?t = ff_amf_tag_size(ptr, data_end);
> >
> > Plain wrong - variable is used right below.
> ...but it already exists at the top of rtmp_parse_result().

Indeed, removed, thanks.



More information about the ffmpeg-devel mailing list