[rtmpdump] Yet another "Received FLV packet before play()!"

Howard Chu hyc at highlandsun.com
Thu Apr 7 21:08:11 CEST 2011


Олег Г wrote:
> After some research I created more correct patch (I hope).
> That's what I found:
> With wireshark I could see that this broadcast server doesn't send
> NetStream.Play.Start after play request. But it sends
> NetStream.Play.PublishNotify. I don't know is such a server response is
> correct, but with attached patch rtmpdump seems to work ok.

Thanks, looks fine to me. Committed to SVN.

> Index: librtmp/rtmp.c
> ===================================================================
> --- librtmp/rtmp.c	(revision 565)
> +++ librtmp/rtmp.c	(working copy)
> @@ -2282,6 +2282,8 @@
>   static const AVal av_NetStream_Play_Stop = AVC("NetStream.Play.Stop");
>   static const AVal av_NetStream_Seek_Notify = AVC("NetStream.Seek.Notify");
>   static const AVal av_NetStream_Pause_Notify = AVC("NetStream.Pause.Notify");
> +static const AVal av_NetStream_Play_PublishNotify =
> +AVC("NetStream.Play.PublishNotify");
>   static const AVal av_NetStream_Play_UnpublishNotify =
>   AVC("NetStream.Play.UnpublishNotify");
>   static const AVal av_NetStream_Publish_Start = AVC("NetStream.Publish.Start");
> @@ -2449,7 +2451,8 @@
>   	  RTMP_Log(RTMP_LOGERROR, "Closing connection: %s", code.av_val);
>   	}
>
> -      else if (AVMATCH(&code,&av_NetStream_Play_Start))
> +      else if (AVMATCH(&code,&av_NetStream_Play_Start)
> +           || AVMATCH(&code,&av_NetStream_Play_PublishNotify))
>   	{
>   	  int i;
>   	  r->m_bPlaying = TRUE;


More information about the rtmpdump mailing list