[FFmpeg-cvslog] vsrc_buffer: simplify av_vsrc_buffer_add_frame*() interface

Michael Niedermayer michaelni at gmx.at
Sat May 14 00:19:05 CEST 2011


On Sat, May 14, 2011 at 12:03:53AM +0200, Michael Niedermayer wrote:
> On Fri, May 13, 2011 at 11:24:47PM +0200, Stefano Sabatini wrote:
> > On date Friday 2011-05-13 20:37:13 +0200, Michael Niedermayer wrote:
> > > On Fri, May 13, 2011 at 07:07:27PM +0200, Stefano Sabatini wrote:
> > > > On date Friday 2011-05-13 16:37:05 +0000, Carl Eugen Hoyos wrote:
> > > > > Stefano Sabatini <git <at> videolan.org> writes:
> > > > > 
> > > > > > ffmpeg | branch: master | Stefano Sabatini | Mon May  2 09:52:11 2011
> > > > > > +0200| [64c06615d2b99fb9f4ffd6226d0e5787b44a41e2] | committer: Stefano Sabatini
> > > > > > 
> > > > > > vsrc_buffer: simplify av_vsrc_buffer_add_frame*() interface
> > > > > 
> > > > > This broke multi-threaded (H-264) decoding, ticket 197.
> > > > 
> > > > Check attached, untested but now I have no time and I'm not sure I can
> > > > understand which is the correct way to deal with pkt_dts/pts in case
> > > > of multithreading.
> > > 
> > > I think this stuff should be in avcodec_default_get_buffer() (too)
> > 
> > I believe it is at least partially already done there (with exception
> > for the SAR?).
> > 
> > Michael can you say which is the right way to tackle the problem?
> > 
> > Should:
> > picture->pkt_dts= avpkt->dts;
> > picture->pkt_pos= avpkt->pos;
> > 
> > be set only if threads are disabled?
> 
> the pos line there is wrong with frame reordering  even without threads.
> dts is wrong if threads are used
> 
> the others are also wrong when frame reoerdering is used.

To explain this a bit more
when frames are reordered the frame output and the decoded arent
neccessarily the same, the AVCodecContext contains the decoded
the AVFrame the output
A copy between them is wrong when they differ. (which is rare but that
rare case is the whole point behind having these values in AVFrame ..)

I tried to fix it with my last 2 commits.

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110514/a4e4ca24/attachment.asc>


More information about the ffmpeg-cvslog mailing list