X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtp.c;h=b6b4b72aa313020803fc24c535d74a9d0a7f80a8;hb=656e606cae8cdb794c4d2640bbb27f96da3cc67e;hp=4be845a06c0c4e6b20f3a13ef27e6775b20c78f7;hpb=3b3ea34655db02d9cd9ea1a4122e920a7fdec602;p=ffmpeg diff --git a/libavformat/rtp.c b/libavformat/rtp.c index 4be845a06c0..b6b4b72aa31 100644 --- a/libavformat/rtp.c +++ b/libavformat/rtp.c @@ -98,7 +98,8 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) /* Was the payload type already specified for the RTP muxer? */ if (ofmt && ofmt->priv_class) { int64_t payload_type; - if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0) + if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0 && + payload_type >= 0) return (int)payload_type; }