diff options
author | van <[email protected]> | 2009-05-09 04:39:28 +0000 |
---|---|---|
committer | van <[email protected]> | 2009-05-09 04:39:28 +0000 |
commit | 12b539e41336d755536cc324041bf100ad016103 (patch) | |
tree | 3c2e8a7fcc941a6fb1ded1e9d3a8dde37c41f48f /libhb | |
parent | fc192423c6a523f059c26a384df6908b4d4c2b1d (diff) |
Work around ffmpeg bug where raw video decoder doesn't use frame buffer allocation routine in context.get_buffer so we never get a chance to put our pts in the frame.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2407 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/decavcodec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 8b09afcf7..d02ca9d1d 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -589,6 +589,14 @@ static int decodeFrame( hb_work_private_t *pv, uint8_t *data, int size ) { frame_dur += frame.repeat_pict * frame_dur * 0.5; } + // XXX Unlike every other video decoder, the Raw decoder doesn't + // use the standard buffer allocation routines so we never + // get to put a PTS in the frame. Do it now. + if ( pv->context->codec_id == CODEC_ID_RAWVIDEO ) + { + frame.pts = pv->pts; + pv->pts = -1; + } // If there was no pts for this frame, assume constant frame rate // video & estimate the next frame time from the last & duration. double pts = frame.pts; |