]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtp.c
Do not call parse_keyframes_index with NULL stream.
[ffmpeg] / libavformat / rtp.c
index 127b540748c0be43829447f0b44d6b718642561a..98d96160dbc3654057966860c27ba2689610dd45 100644 (file)
@@ -97,9 +97,10 @@ 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) {
-        int payload_type = av_get_int(fmt->priv_data, "payload_type", NULL);
-        if (payload_type >= 0)
-            return payload_type;
+        int64_t payload_type;
+        if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0 &&
+            payload_type >= 0)
+            return (int)payload_type;
     }
 
     /* static payload type */