diff --git a/ffmpeg.c b/ffmpeg.c
index a07d3c7..3dec66c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3192,6 +3192,9 @@ static void opt_input_file(const char *filename)
                           avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->strict_std_compliance);
     ic->flags |= AVFMT_FLAG_NONBLOCK;
 
+    if (audio_stream_copy)
+        ic->flags |= AVFMT_FLAG_AC;
+
     /* open the input file with generic libav function */
     err = av_open_input_file(&ic, filename, file_iformat, 0, ap);
     if (err < 0) {
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 7990ce7..3e4831b 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -782,6 +782,7 @@ typedef struct AVFormatContext {
 #define AVFMT_FLAG_NOFILLIN     0x0010 ///< Do not infer any values from other values, just return what is stored in the container
 #define AVFMT_FLAG_NOPARSE      0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
 #define AVFMT_FLAG_RTP_HINT     0x0040 ///< Add RTP hinting to the output file
+#define AVFMT_FLAG_AC           0x0080 ///< Audio will be copied
 
     int loop_input;
 
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index b7386fb..58f36f5 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -152,7 +152,7 @@ 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)
+    if (mp3_parse_vbr_tags(s, st, off) < 0 || (AVFMT_FLAG_AC & s->flags))
         avio_seek(s->pb, off, SEEK_SET);
 
     /* the parameters will be extracted from the compressed bitstream */
