[FFmpeg-devel] [PATCH v2] lavf/mxfenc: support creating s436m data tracks
Baptiste Coudurier
baptiste.coudurier at gmail.com
Mon Sep 24 23:55:32 EEST 2018
On Thu, Jul 19, 2018 at 2:32 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:
> On Wed, Jul 04, 2018 at 03:06:54PM -0700, Baptiste Coudurier wrote:
> > ---
> > libavformat/mxf.c | 1 +
> > libavformat/mxfdec.c | 2 ++
> > libavformat/mxfenc.c | 41 +++++++++++++++++++++++++++++++++++++----
> > libavformat/utils.c | 6 +++++-
> > 4 files changed, 45 insertions(+), 5 deletions(-)
> [...]
> > diff --git a/libavformat/utils.c b/libavformat/utils.c
> > index c9cdd2b470..36a32ad9c2 100644
> > --- a/libavformat/utils.c
> > +++ b/libavformat/utils.c
> > @@ -1003,6 +1003,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
> > *pnum = frame_size;
> > *pden = sample_rate;
> > break;
> > + case AVMEDIA_TYPE_DATA:
> > + *pnum = st->time_base.num;
> > + *pden = st->time_base.den;
> > + break;
> > default:
> > break;
> > }
> > @@ -1405,7 +1409,7 @@ static void compute_pkt_fields(AVFormatContext *s,
> AVStream *st,
> > presentation_delayed, delay, av_ts2str(pkt->pts),
> av_ts2str(pkt->dts), av_ts2str(st->cur_dts));
> >
> > /* update flags */
> > - if (is_intra_only(st->codecpar->codec_id))
> > + if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA ||
> is_intra_only(st->codecpar->codec_id))
> > pkt->flags |= AV_PKT_FLAG_KEY;
> > #if FF_API_CONVERGENCE_DURATION
> > FF_DISABLE_DEPRECATION_WARNINGS
>
> This should be a seperate patch.
> Also i think forcing duration=1 is not correct for all AVMEDIA_TYPE_DATA
> for example there are ID3 and fonts. These would i guess if they have a
> timebase set apply to more than 1 "unit"
>
I applied the separate patch.
Will apply this patch shortly, addressing Marton comment.
Thanks!
--
Baptiste
More information about the ffmpeg-devel
mailing list