mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
rtpdec: Set prev_ret properly when parsing more data from mpegts RTP packets
Originally committed as revision 25404 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
45658b7414
commit
b7952ed184
@ -644,12 +644,16 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
|
|||||||
return rv ? rv : has_next_packet(s);
|
return rv ? rv : has_next_packet(s);
|
||||||
} else {
|
} else {
|
||||||
// TODO: Move to a dynamic packet handler (like above)
|
// 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;
|
return -1;
|
||||||
|
}
|
||||||
ret = ff_mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index,
|
ret = ff_mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index,
|
||||||
s->read_buf_size - s->read_buf_index);
|
s->read_buf_size - s->read_buf_index);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
s->prev_ret = -1;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
s->read_buf_index += ret;
|
s->read_buf_index += ret;
|
||||||
if (s->read_buf_index < s->read_buf_size)
|
if (s->read_buf_index < s->read_buf_size)
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user