libavformat/gdv: Fix parsing for soundless video
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>
Sun, 2 Jul 2017 20:10:55 +0000 (01:10 +0500)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 5 Jul 2017 21:25:58 +0000 (23:25 +0200)
Added 2 byte skipping if there no sound present, that fixes playback
files without sound stream.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/gdv.c

index 90692bd..3220932 100644 (file)
@@ -107,6 +107,8 @@ static int gdv_read_header(AVFormatContext *ctx)
         gdv->audio_size = (ast->codecpar->sample_rate / fps) *
                            ast->codecpar->channels * (1 + !!(snd_flags & 4)) / (1 + !!(snd_flags & 8));
         gdv->is_audio = 1;
+    } else {
+        avio_skip(pb, 2);
     }
     vid_depth = avio_rl16(pb);
     avio_skip(pb, 4);