diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index aa31e46..2e363fc 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1958,6 +1958,20 @@ static int mp_decode_frame(MPADecodeContext *s,
     int i, nb_frames, ch;
     OUT_INT *samples_ptr;
 
+    /* in case of layer 3 test first frame for vbr header and skip if found */
+    if (3 == s->layer && !s->avctx->frame_size) {
+        const int64_t xing_offtbl[2][2] = {{32, 17}, {17,9}};
+        uint32_t v = AV_RB32(buf + HEADER_SIZE + xing_offtbl[s->lsf == 1][s->nb_channels == 1]);
+
+        if(v == MKBETAG('X', 'i', 'n', 'g') || v == MKBETAG('I', 'n', 'f', 'o'))
+            return 0;
+
+        v = AV_RB32(buf + HEADER_SIZE + 32);
+
+        if(v == MKBETAG('V', 'B', 'R', 'I'))
+            return 0;
+    }
+
     init_get_bits(&s->gb, buf + HEADER_SIZE, (buf_size - HEADER_SIZE)*8);
 
     /* skip error protection field */
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index b7386fb..f1de60b 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -152,8 +152,8 @@ static int mp3_read_header(AVFormatContext *s,
     if (!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
         ff_id3v1_read(s);
 
-    if (mp3_parse_vbr_tags(s, st, off) < 0)
-        avio_seek(s->pb, off, SEEK_SET);
+    mp3_parse_vbr_tags(s, st, off);
+    avio_seek(s->pb, off, SEEK_SET);
 
     /* the parameters will be extracted from the compressed bitstream */
     return 0;
