]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtp.c
10l, fix nuv_header for the case when there is no video stream.
[ffmpeg] / libavformat / rtp.c
index 29b58f3eba9355bc178b7f8d315ee0fedebd9534..b1501e6704f71fc73496750fe2f4f028836a1c6e 100644 (file)
@@ -18,8 +18,9 @@
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
+#include "libavcodec/bitstream.h"
 #include "avformat.h"
-#include "bitstream.h"
 
 #include <unistd.h>
 #include "network.h"
 //#define DEBUG
 
 /* from http://www.iana.org/assignments/rtp-parameters last updated 05 January 2005 */
+/* payload types >= 96 are dynamic;
+ * payload types between 72 and 76 are reserved for RTCP conflict avoidance;
+ * all the other payload types not present in the table are unassigned or
+ * reserved
+ */
 static const struct
 {
     int pt;
-    const char enc_name[50]; /* XXX: why 50 ? */
+    const char enc_name[6];
     enum CodecType codec_type;
     enum CodecID codec_id;
     int clock_rate;
@@ -51,8 +57,8 @@ static const struct
   {11, "L16",        CODEC_TYPE_AUDIO,   CODEC_ID_PCM_S16BE, 44100, 1},
   {12, "QCELP",      CODEC_TYPE_AUDIO,   CODEC_ID_QCELP, 8000, 1},
   {13, "CN",         CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {14, "MPA",        CODEC_TYPE_AUDIO,   CODEC_ID_MP2, 90000, -1},
-  {14, "MPA",        CODEC_TYPE_AUDIO,   CODEC_ID_MP3, 90000, -1},
+  {14, "MPA",        CODEC_TYPE_AUDIO,   CODEC_ID_MP2, -1, -1},
+  {14, "MPA",        CODEC_TYPE_AUDIO,   CODEC_ID_MP3, -1, -1},
   {15, "G728",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
   {16, "DVI4",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 11025, 1},
   {17, "DVI4",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 22050, 1},