[FFmpeg-devel] [PATCH] rtsp: only break on parse_rtsp_message on error

Tristan Matthews tmatth at videolan.org
Sun Dec 3 17:31:17 EET 2017


On Sat, Dec 2, 2017 at 11:01 AM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Fri, Dec 01, 2017 at 04:09:15PM -0500, Tristan Matthews wrote:
>> Fix suggested by Luca Barbato.
>>
>> This was causing spurious EOFs when using -rtsp_transport udp, as
>> reported in https://bugzilla.libav.org/show_bug.cgi?id=1103
>> ---
>>  libavformat/rtsp.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> where is the code which interprets 0 as EOF ?

udp_read_packet is called here:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/rtsp.c;h=b6da61b95e6c0ecce63d1d86e2b8fe7066ee2f96;hb=HEAD#l2082

which in turn, calls rtsp_parse_message here:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/rtsp.c;h=b6da61b95e6c0ecce63d1d86e2b8fe7066ee2f96;hb=HEAD#l2010

which returns 0 in the non-error case here:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/rtsp.c;h=b6da61b95e6c0ecce63d1d86e2b8fe7066ee2f96;hb=HEAD#l1945

this is then interpreted as an EOF here
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/rtsp.c;h=b6da61b95e6c0ecce63d1d86e2b8fe7066ee2f96;hb=HEAD#l2098

Best,
Tristan

> also nicolas may want to look at this, he was working on EOF vs 0 issues
> (thus ccing nicolas)
>
> thanks
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> it is not once nor twice but times without number that the same ideas make
> their appearance in the world. -- Aristotle
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list