summaryrefslogtreecommitdiff
path: root/libavformat/swfenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-07-19 03:25:50 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-07-19 03:25:50 +0000
commit9b92ed7666a78b417cb7e98ca9a92c0dbab31df4 (patch)
treee31d7ebf9841ed0d2e82b5d18fe46d38ceeb2ac9 /libavformat/swfenc.c
parent79f4494a042b98e910524c7b93f294c9ec5118d0 (diff)
downloadffmpeg-9b92ed7666a78b417cb7e98ca9a92c0dbab31df4.tar.gz
update swf video frame number when muxing done, fix #439
Originally committed as revision 14293 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/swfenc.c')
-rw-r--r--libavformat/swfenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 193663f61e..2d341dcc47 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -344,6 +344,7 @@ static int swf_write_video(AVFormatContext *s,
/* 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 @@ static int swf_write_trailer(AVFormatContext *s)
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;