changeset 2917:62ff44e23c10 libavformat

Make rtp_parse_packet() always call the vfunc of the dynamic payload handler if there is one. See "[PATCH] Realmedia / RTSP (RDT)" thread on ML.
author rbultje
date Thu, 10 Jan 2008 13:52:35 +0000
parents c2588e541432
children 9e85e46922b5
files rtpdec.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rtpdec.c	Thu Jan 10 08:34:37 2008 +0000
+++ b/rtpdec.c	Thu Jan 10 13:52:35 2008 +0000
@@ -474,6 +474,8 @@
             s->read_buf_index = 0;
             return 1;
         }
+    } else if (s->parse_packet) {
+        rv = s->parse_packet(s, pkt, &timestamp, buf, len);
     } else {
         // at this point, the RTP header has been stripped;  This is ASSUMING that there is only 1 CSRC, which in't wise.
         switch(st->codec->codec_id) {
@@ -529,12 +531,8 @@
             rv= 0;
             break;
         default:
-            if(s->parse_packet) {
-                rv= s->parse_packet(s, pkt, &timestamp, buf, len);
-            } else {
                 av_new_packet(pkt, len);
                 memcpy(pkt->data, buf, len);
-            }
             break;
         }