changeset 305:ef53bff8bf23 libavformat

use parsers
author bellard
date Mon, 10 Nov 2003 18:40:14 +0000
parents d58c8859ff8c
children e7a8d4dd8e14
files rtp.c
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rtp.c	Mon Nov 10 18:39:26 2003 +0000
+++ b/rtp.c	Mon Nov 10 18:40:14 2003 +0000
@@ -234,6 +234,18 @@
             av_free(s);
             return NULL;
         }
+    } else {
+        switch(st->codec.codec_id) {
+        case CODEC_ID_MPEG1VIDEO:
+        case CODEC_ID_MPEG2VIDEO:
+        case CODEC_ID_MP2:
+        case CODEC_ID_MP3:
+        case CODEC_ID_MPEG4:
+            st->need_parsing = 1;
+            break;
+        default:
+            break;
+        }
     }
     return s;
 }
@@ -322,7 +334,7 @@
             memcpy(pkt->data, buf, len);
             break;
         case CODEC_ID_MPEG1VIDEO:
-            /* better than nothing: skip mpeg audio RTP header */
+            /* better than nothing: skip mpeg video RTP header */
             if (len <= 4)
                 return -1;
             h = decode_be32(buf);