Mercurial > libavformat.hg
comparison swfenc.c @ 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 | 7a0230981402 |
children | 549a09cf23fe |
comparison
equal
deleted
inserted
replaced
3590:b22fa30c033e | 3591:aa6e8ff72d9e |
---|---|
342 enc->codec_id == CODEC_ID_FLV1) { | 342 enc->codec_id == CODEC_ID_FLV1) { |
343 if (swf->video_frame_number == 0) { | 343 if (swf->video_frame_number == 0) { |
344 /* create a new video object */ | 344 /* create a new video object */ |
345 put_swf_tag(s, TAG_VIDEOSTREAM); | 345 put_swf_tag(s, TAG_VIDEOSTREAM); |
346 put_le16(pb, VIDEO_ID); | 346 put_le16(pb, VIDEO_ID); |
347 swf->vframes_pos = url_ftell(pb); | |
347 put_le16(pb, 15000); /* hard flash player limit */ | 348 put_le16(pb, 15000); /* hard flash player limit */ |
348 put_le16(pb, enc->width); | 349 put_le16(pb, enc->width); |
349 put_le16(pb, enc->height); | 350 put_le16(pb, enc->height); |
350 put_byte(pb, 0); | 351 put_byte(pb, 0); |
351 put_byte(pb,codec_get_tag(swf_codec_tags,enc->codec_id)); | 352 put_byte(pb,codec_get_tag(swf_codec_tags,enc->codec_id)); |
492 if (!url_is_streamed(s->pb) && video_enc) { | 493 if (!url_is_streamed(s->pb) && video_enc) { |
493 file_size = url_ftell(pb); | 494 file_size = url_ftell(pb); |
494 url_fseek(pb, 4, SEEK_SET); | 495 url_fseek(pb, 4, SEEK_SET); |
495 put_le32(pb, file_size); | 496 put_le32(pb, file_size); |
496 url_fseek(pb, swf->duration_pos, SEEK_SET); | 497 url_fseek(pb, swf->duration_pos, SEEK_SET); |
498 put_le16(pb, swf->video_frame_number); | |
499 url_fseek(pb, swf->vframes_pos, SEEK_SET); | |
497 put_le16(pb, swf->video_frame_number); | 500 put_le16(pb, swf->video_frame_number); |
498 url_fseek(pb, file_size, SEEK_SET); | 501 url_fseek(pb, file_size, SEEK_SET); |
499 } | 502 } |
500 return 0; | 503 return 0; |
501 } | 504 } |