[FFmpeg-cvslog] r17764 - trunk/libavformat/rtpdec.c

rbultje subversion
Tue Mar 3 14:41:50 CET 2009


Author: rbultje
Date: Tue Mar  3 14:41:50 2009
New Revision: 17764

Log:
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.

Modified:
   trunk/libavformat/rtpdec.c

Modified: trunk/libavformat/rtpdec.c
==============================================================================
--- trunk/libavformat/rtpdec.c	Tue Mar  3 14:38:40 2009	(r17763)
+++ trunk/libavformat/rtpdec.c	Tue Mar  3 14:41:50 2009	(r17764)
@@ -473,6 +473,7 @@ int rtp_parse_packet(RTPDemuxContext *s,
             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 @@ int rtp_parse_packet(RTPDemuxContext *s,
             memcpy(pkt->data, buf, len);
             break;
         }
+    }
 
         // now perform timestamp things....
         finalize_packet(s, pkt, timestamp);
-    }
+
     return rv;
 }
 




More information about the ffmpeg-cvslog mailing list