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

mstorsjo subversion
Fri Oct 8 10:40:08 CEST 2010


Author: mstorsjo
Date: Fri Oct  8 10:40:08 2010
New Revision: 25404

Log:
rtpdec: Set prev_ret properly when parsing more data from mpegts RTP packets

Modified:
   trunk/libavformat/rtpdec.c

Modified: trunk/libavformat/rtpdec.c
==============================================================================
--- trunk/libavformat/rtpdec.c	Fri Oct  8 09:28:17 2010	(r25403)
+++ trunk/libavformat/rtpdec.c	Fri Oct  8 10:40:08 2010	(r25404)
@@ -644,12 +644,16 @@ int rtp_parse_packet(RTPDemuxContext *s,
             return rv ? rv : has_next_packet(s);
         } else {
             // TODO: Move to a dynamic packet handler (like above)
-            if (s->read_buf_index >= s->read_buf_size)
+            if (s->read_buf_index >= s->read_buf_size) {
+                s->prev_ret = -1;
                 return -1;
+            }
             ret = ff_mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index,
                                       s->read_buf_size - s->read_buf_index);
-            if (ret < 0)
+            if (ret < 0) {
+                s->prev_ret = -1;
                 return -1;
+            }
             s->read_buf_index += ret;
             if (s->read_buf_index < s->read_buf_size)
                 return 1;



More information about the ffmpeg-cvslog mailing list