[FFmpeg-soc] [soc]: r3458 - mxf/mxfenc.c
spyfeng
subversion at mplayerhq.hu
Tue Aug 19 17:15:26 CEST 2008
Author: spyfeng
Date: Tue Aug 19 17:15:26 2008
New Revision: 3458
Log:
always update header_byte_count for streamed and non-streamed file in mux_write_header() before put_flush_packet()
Modified:
mxf/mxfenc.c
Modified: mxf/mxfenc.c
==============================================================================
--- mxf/mxfenc.c (original)
+++ mxf/mxfenc.c Tue Aug 19 17:15:26 2008
@@ -854,13 +854,11 @@ static int mux_write_header(AVFormatCont
goto fail;
offset_now = url_ftell(s->pb);
mxf->header_byte_count = offset_now - header_metadata_start;
+ // update header_byte_count
+ url_fseek(pb, mxf->header_byte_count_offset, SEEK_SET);
+ put_be64(pb, mxf->header_byte_count);
+ url_fseek(pb, offset_now, SEEK_SET);
- // if streamed file, update header_byte_count field here, before put_flush_packet()
- if (url_is_streamed(s->pb)) {
- url_fseek(pb, mxf->header_byte_count_offset, SEEK_SET);
- put_be64(pb, mxf->header_byte_count);
- url_fseek(pb, offset_now, SEEK_SET);
- }
put_flush_packet(pb);
return 0;
fail:
@@ -887,10 +885,6 @@ static int mxf_update_header_partition(A
MXFContext *mxf = s->priv_data;
ByteIOContext *pb = s->pb;
- url_fseek(pb, mxf->header_byte_count_offset, SEEK_SET);
- put_be64(pb, mxf->header_byte_count);
- put_flush_packet(pb);
-
url_fseek(pb, mxf->header_footer_partition_offset, SEEK_SET);
put_be64(pb, footer_partition_offset);
put_flush_packet(pb);
More information about the FFmpeg-soc
mailing list