changeset 4631:4bbf1fe0796b libavformat

In the current implementation of rtp_parse_packet(), finalize_packet() is called for all packets with an internal handler function but only for non-first packets from dynamic payload parse_packet() handlers. This patch fixes that. Bug was noticed by Luca in "[PATCH] rtpdec.c: don't overwrite pkt->stream_index in finalize_packet()" thread.
author rbultje
date Tue, 03 Mar 2009 13:41:50 +0000
parents e04458242c54
children 232a9af14aea
files rtpdec.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rtpdec.c	Tue Mar 03 13:26:17 2009 +0000
+++ b/rtpdec.c	Tue Mar 03 13:41:50 2009 +0000
@@ -473,6 +473,7 @@
             s->read_buf_index = 0;
             return 1;
         }
+        return 0;
     } else if (s->parse_packet) {
         rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
                              s->st, pkt, &timestamp, buf, len, flags);
@@ -535,10 +536,11 @@
             memcpy(pkt->data, buf, len);
             break;
         }
+    }
 
         // now perform timestamp things....
         finalize_packet(s, pkt, timestamp);
-    }
+
     return rv;
 }