changeset 3798:181ce3b7ca8b libavformat

factorize packet skip code
author bcoudurier
date Fri, 29 Aug 2008 22:07:01 +0000
parents 5fc16ca7b356
children 2f2fbec96aeb
files flvdec.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flvdec.c	Fri Aug 29 22:03:18 2008 +0000
+++ b/flvdec.c	Fri Aug 29 22:07:01 2008 +0000
@@ -327,15 +327,14 @@
         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;
     }