]> git.sesse.net Git - ffmpeg/commitdiff
avformat/swfenc: fix generation of FileAttributes tag
authorMarton Balint <cus@passwd.hu>
Sat, 28 Sep 2019 21:05:21 +0000 (23:05 +0200)
committerMarton Balint <cus@passwd.hu>
Sat, 23 Jan 2021 19:10:04 +0000 (20:10 +0100)
Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/swfenc.c

index 14be2b72aa87392170a3711961487759a0b5466a..8ee175664a16fc9a22592642053a470351475505 100644 (file)
@@ -277,10 +277,10 @@ static int swf_write_header(AVFormatContext *s)
     swf->duration_pos = avio_tell(pb);
     avio_wl16(pb, (uint16_t)(DUMMY_DURATION * (int64_t)rate / rate_base)); /* frame count */
 
-    /* avm2/swf v9 (also v8?) files require a file attribute tag */
-    if (version == 9) {
+    /* swf v8 and later files require a file attribute tag */
+    if (version >= 8) {
         put_swf_tag(s, TAG_FILEATTRIBUTES);
-        avio_wl32(pb, 1<<3); /* set ActionScript v3/AVM2 flag */
+        avio_wl32(pb, (version >= 9) << 3); /* set ActionScript v3/AVM2 flag */
         put_swf_end_tag(s);
     }