[FFmpeg-devel] [PATCH] avformat/mxfdec: Remove this_partition

Michael Niedermayer michael at niedermayer.cc
Sat Dec 24 21:29:25 EET 2022


On Fri, Dec 23, 2022 at 11:01:55PM +0100, Marton Balint wrote:
> 
> 
> On Fri, 23 Dec 2022, Michael Niedermayer wrote:
> 
> > Suggested-by: Tomas Härdin <git at haerdin.se>
> > 
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavformat/mxfdec.c | 37 +++++++++++++++++++++++--------------
> > 1 file changed, 23 insertions(+), 14 deletions(-)
> 
> this_partition should be == pack_ofs - run_in, not pack_ofs + run_in.
> 
[...]
> > @@ -887,7 +896,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
> >     return 0;
> > }
> > 
> > -static uint64_t partition_score(MXFPartition *p)
> > +static uint64_t partition_score(MXFContext *mxf, MXFPartition *p)
> > {
> >     uint64_t score;
> >     if (!p)
> > @@ -900,7 +909,7 @@ static uint64_t partition_score(MXFPartition *p)
> >         score = 3;
> >     else
> >         score = 1;
> > -    return (score << 60) | ((uint64_t)p->this_partition >> 4);
> > +    return (score << 60) | ((uint64_t)p->pack_ofs + mxf->run_in >> 4);
> > }
> 
> You can use pack_ofs here directly instead of this_partition, so the
> function prototype does not have to be changed.

ok will repost with these 2 changes

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20221224/d0b97b89/attachment.sig>


More information about the ffmpeg-devel mailing list