changeset 3591:aa6e8ff72d9e libavformat

update swf video frame number when muxing done, fix #439
author bcoudurier
date Sat, 19 Jul 2008 03:25:50 +0000
parents b22fa30c033e
children 76964dfba31c
files swf.h swfenc.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/swf.h	Fri Jul 18 07:13:56 2008 +0000
+++ b/swf.h	Sat Jul 19 03:25:50 2008 +0000
@@ -67,7 +67,7 @@
     int audio_stream_index;
     offset_t duration_pos;
     offset_t tag_pos;
-
+    offset_t vframes_pos;
     int samples_per_frame;
     int sound_samples;
     int swf_frame_number;
--- a/swfenc.c	Fri Jul 18 07:13:56 2008 +0000
+++ b/swfenc.c	Sat Jul 19 03:25:50 2008 +0000
@@ -344,6 +344,7 @@
             /* create a new video object */
             put_swf_tag(s, TAG_VIDEOSTREAM);
             put_le16(pb, VIDEO_ID);
+            swf->vframes_pos = url_ftell(pb);
             put_le16(pb, 15000); /* hard flash player limit */
             put_le16(pb, enc->width);
             put_le16(pb, enc->height);
@@ -495,6 +496,8 @@
         put_le32(pb, file_size);
         url_fseek(pb, swf->duration_pos, SEEK_SET);
         put_le16(pb, swf->video_frame_number);
+        url_fseek(pb, swf->vframes_pos, SEEK_SET);
+        put_le16(pb, swf->video_frame_number);
         url_fseek(pb, file_size, SEEK_SET);
     }
     return 0;