[FFmpeg-devel] [PATCH] Add SUP (raw BluRay PGS subtitle) muxer

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Sep 4 21:09:03 CEST 2014


On Thu, Sep 04, 2014 at 10:19:05AM +0200, Hendrik Leppkes wrote:
> On Fri, Aug 29, 2014 at 12:31 PM, Petri Hintukainen <phintuka at gmail.com> wrote:
> > +static int sup_write_packet(AVFormatContext *s, AVPacket *pkt)
> > +{
> > +    /* header */
> > +    avio_wb16(s->pb, SUP_PGS_MAGIC);
> > +    avio_wb32(s->pb, (uint64_t)pkt->pts);
> > +    avio_wb32(s->pb, (uint64_t)pkt->dts);
> > +
> 
> All the timestamp talk in the demuxer thread made me think about this part.
> What if no dts or pts is set (ie. its AV_NOPTS_VALUE), I doubt writing
> that as-is is going to fly over well with other tools (especially
> because its value is > 32-bit anyway)
> 
> Should you write 0? Should you write dts=pts if only pts is set, and
> dts is unset?

Others have given their opinion, but if you want to be
conservative you could just disallow this case and refuse to
mux such data.
At least if you have no examples to test such behaviour.


More information about the ffmpeg-devel mailing list