On Fri, Oct 24, 2014 at 11:50 AM, Andrey Utkin
<andrey.krieger.ut...@gmail.com> wrote:
> 2014-10-24 20:34 GMT+04:00 Benoit Fouet <benoit.fo...@free.fr>:
>> Shouldn't this also test p->filename for non-NULLness?
>> LGTM otherwise.
>
> The code was copied from lavf/rtspdec.c
> There're places with same code.
> If this is really needed, then we should update it in other places.
>
> libavformat/sapdec.c:static int sap_probe(AVProbeData *p)
> libavformat/sapdec.c-{
> libavformat/sapdec.c-    if (av_strstart(p->filename, "sap:", NULL))
> libavformat/sapdec.c-        return AVPROBE_SCORE_MAX;
> libavformat/sapdec.c-    return 0;
> libavformat/sapdec.c-}
>
> libavformat/rtspdec.c:static int rtsp_probe(AVProbeData *p)
> libavformat/rtspdec.c-{
> libavformat/rtspdec.c-    if (
> libavformat/rtspdec.c-#if CONFIG_TLS_PROTOCOL
> libavformat/rtspdec.c-        av_strstart(p->filename, "rtsps:", NULL) ||
> libavformat/rtspdec.c-#endif
> libavformat/rtspdec.c-        av_strstart(p->filename, "rtsp:", NULL))
> libavformat/rtspdec.c-        return AVPROBE_SCORE_MAX;
> libavformat/rtspdec.c-    return 0;
> libavformat/rtspdec.c-}
>
> libavformat/rtsp.c:static int rtp_probe(AVProbeData *p)
> libavformat/rtsp.c-{
> libavformat/rtsp.c-    if (av_strstart(p->filename, "rtp:", NULL))
> libavformat/rtsp.c-        return AVPROBE_SCORE_MAX;
> libavformat/rtsp.c-    return 0;
> libavformat/rtsp.c-}

Those URLs are very explicit, while `/dev/` can mean anything,
including `/dev/stdin`.

Timothy
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to