k. BTW, being a newbie in codec stuff, when should I use incoming dts vs.
pts as the frame tm?


On 5 February 2013 12:30, Joakim Plate <notifications@github.com> wrote:

> In xbmc/cores/dvdplayer/DVDCodecs/Video/StageFrightVideo.cpp:
>
> > +    //frame->pts = (dts != DVD_NOPTS_VALUE) ? pts_dtoi(dts) : ((pts != DVD_NOPTS_VALUE) ? pts_dtoi(pts) : 0);
> > +    frame->pts = (pts != DVD_NOPTS_VALUE) ? pts_dtoi(pts) : ((dts != DVD_NOPTS_VALUE) ? pts_dtoi(dts) : 0);
> > +    frame->duration = 0;
> > +    frame->medbuf = p->getBuffer(demuxer_bytes);
> > +    if (!frame->medbuf)
> > +    {
> > +      free(frame);
> > +      return VC_ERROR;
> > +    }
> > +    fast_memcpy(frame->medbuf->data(), demuxer_content, demuxer_bytes);
> > +    frame->medbuf->meta_data()->clear();
> > +    frame->medbuf->meta_data()->setInt64(kKeyTime, frame->pts);
> > +
> > +    if (p->mPrevPts >= 0)
> > +    {
> > +      frame->duration = frame->pts - p->mPrevPts;
>
> Just ignore gettimesize for now. It's not very important. You should avoid
> buffering more than a single frame/packet anyway. Preferably you should not
> buffer any, but that likely doesn't work for hw.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/xbmc/xbmc/pull/1832/files#r2891327>.
>
>