diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-29 22:07:01 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-29 22:07:01 +0000 |
commit | 3d9aecb0d7a763e0b0b04eef4cef2508401b7a34 (patch) | |
tree | ada68e4205093dc6769a35b4a01286ea428b4e63 /libavformat/flvdec.c | |
parent | 6298eb810de8364bbbd470abfb321a0416964b1d (diff) | |
download | ffmpeg-3d9aecb0d7a763e0b0b04eef4cef2508401b7a34.tar.gz |
factorize packet skip code
Originally committed as revision 15041 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 1fc7146ca0..eb24792e3d 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -327,15 +327,14 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) is_audio=0; flags = get_byte(s->pb); size--; - if ((flags & 0xf0) == 0x50) { /* video info / command frame */ - url_fskip(s->pb, size); - continue; - } + if ((flags & 0xf0) == 0x50) /* video info / command frame */ + goto skip; } else { if (type == FLV_TAG_TYPE_META && size > 13+1+4) flv_read_metabody(s, next); else /* skip packet */ av_log(s, AV_LOG_ERROR, "skipping flv packet: type %d, size %d, flags %d\n", type, size, flags); + skip: url_fseek(s->pb, next, SEEK_SET); continue; } |