summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-17 12:06:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-17 12:06:31 +0000
commit80036204af792fd31a82b42f345571c4ed699470 (patch)
treee116cfbfc9c2027f4139b94afffbf0231fb0b63a /libavformat/mpeg.c
parent79acfb0e133317c3a38c55b73c3b80f3212af2f9 (diff)
simplify
Originally committed as revision 7567 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index cff9fe2b1e..a8ba8826be 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -1522,21 +1522,18 @@ static int mpegps_read_pes_header(AVFormatContext *s,
len -= 2;
if (header_len > len)
goto error_redo;
+ len -= header_len;
if (flags & 0x80) {
dts = pts = get_pts(&s->pb, -1);
header_len -= 5;
- len -= 5;
if (flags & 0x40) {
dts = get_pts(&s->pb, -1);
header_len -= 5;
- len -= 5;
}
}
- len -= header_len;
- while (header_len > 0) {
- get_byte(&s->pb);
- header_len--;
- }
+ if(header_len < 0)
+ goto error_redo;
+ url_fskip(&s->pb, header_len);
}
else if( c!= 0xf )
goto redo;