[FFmpeg-cvslog] r17414 - trunk/libavformat/mxfenc.c

Reimar Döffinger Reimar.Doeffinger
Wed Feb 18 09:50:39 CET 2009


Hello Baptiste,

On Wed, Feb 18, 2009 at 12:18:55AM -0800, Baptiste Coudurier wrote:
> On 2/17/2009 11:57 PM, Reimar D?ffinger wrote:
> > On Wed, Feb 18, 2009 at 02:05:06AM +0100, bcoudurier wrote:
> >> Author: bcoudurier
> >> Date: Wed Feb 18 02:05:06 2009
> >> New Revision: 17414
> >>
> >> Log:
> >> fix rip body sid when muxing cbr
> >>
> >> Modified:
> >>    trunk/libavformat/mxfenc.c
> >>
> >> Modified: trunk/libavformat/mxfenc.c
> >> ==============================================================================
> >> --- trunk/libavformat/mxfenc.c	Wed Feb 18 01:38:10 2009	(r17413)
> >> +++ trunk/libavformat/mxfenc.c	Wed Feb 18 02:05:06 2009	(r17414)
> >> @@ -1722,7 +1722,10 @@ static void mxf_write_random_index_pack(
> >>      put_buffer(pb, random_index_pack_key, 16);
> >>      klv_encode_ber_length(pb, 28 + 12*mxf->body_partitions_count);
> >>  
> >> -    put_be32(pb, 0); // BodySID of header partition
> >> +    if (mxf->edit_unit_byte_count)
> >> +        put_be32(pb, 1); // BodySID of header partition
> >> +    else
> >> +        put_be32(pb, 0); // BodySID of header partition
> > 
> > I guess you consider
> > put_be32(pb, !!mxf->edit_unit_byte_count);
> > ugly? Just because it seems nicer to me personally.
> 
> Well, not really, I just thought that since these values are pretty
> constant and fixed, tt would be clearer this way.

Avoiding duplicating the "put_be32" helps me more to understand the
format (e.g. it is obvious the field always has the same size, though
put_be32(pb, mxf->edit_unit_byte_count ? 1 : 0); works just as well for
that), but do it as you like, I was mostly curious.

Reimar




More information about the ffmpeg-cvslog mailing list