changeset 6477:2697448798ee libavformat

rtsp: Handle standard assigned codec names for private payload types, too
author mstorsjo
date Wed, 15 Sep 2010 17:39:25 +0000
parents f06908662125
children 1e6ebac87d44
files rtsp.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rtsp.c	Wed Sep 15 17:35:39 2010 +0000
+++ b/rtsp.c	Wed Sep 15 17:39:25 2010 +0000
@@ -114,6 +114,12 @@
                 break;
             }
         }
+        /* If no dynamic handler was found, check with the list of standard
+         * allocated types, if such a stream for some reason happens to
+         * use a private payload type. This isn't handled in rtpdec.c, since
+         * the format name from the rtpmap line never is passed into rtpdec. */
+        if (!rtsp_st->dynamic_handler)
+            codec->codec_id = ff_rtp_codec_id(buf, codec->codec_type);
     } else {
         /* We are in a standard case
          * (from http://www.iana.org/assignments/rtp-parameters). */