[FFmpeg-cvslog] avformat/swfenc: fix generation of FileAttributes tag

Marton Balint git at videolan.org
Sat Jan 23 23:12:51 EET 2021


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Sep 28 23:05:21 2019 +0200| [041e735c815941c87522f41da2f5c7f82950bc35] | committer: Marton Balint

avformat/swfenc: fix generation of FileAttributes tag

Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=041e735c815941c87522f41da2f5c7f82950bc35
---

 libavformat/swfenc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 14be2b72aa..8ee175664a 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -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);
     }
 



More information about the ffmpeg-cvslog mailing list