diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-12-08 21:41:46 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-12-08 21:41:46 +0000 |
commit | 9f9f85fe3f26faf684855bf90dac8fc0b88b7dd6 (patch) | |
tree | 9bb568ddbfe42793da3924023b5dd8f65b5165df | |
parent | 5b1b92f114de20160a03388aac8198a04e69b744 (diff) | |
download | xine-lib-9f9f85fe3f26faf684855bf90dac8fc0b88b7dd6.tar.gz xine-lib-9f9f85fe3f26faf684855bf90dac8fc0b88b7dd6.tar.bz2 |
workaround weird 120fps streams by forcing VIDEO_PTS_MODE. code to obtain
frame rate from ffmpeg is commented, i'm not sure it is correct.
CVS patchset: 7209
CVS date: 2004/12/08 21:41:46
-rw-r--r-- | src/libffmpeg/video_decoder.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libffmpeg/video_decoder.c b/src/libffmpeg/video_decoder.c index a589ea949..3d29b5233 100644 --- a/src/libffmpeg/video_decoder.c +++ b/src/libffmpeg/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.35 2004/09/26 22:54:52 valtri Exp $ + * $Id: video_decoder.c,v 1.36 2004/12/08 21:41:46 miguelfreitas Exp $ * * xine video decoder plugin using ffmpeg * @@ -1095,6 +1095,21 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { img->pts = this->pts; this->pts = 0; + + /* workaround for weird 120fps streams */ + if( this->video_step == 750 ) { +#if 0 + /* use ffmpeg frame rate if available. i'm unsure if ffmpeg + * really knows it better than what demux told us. + */ + if( this->context->frame_rate && this->context->frame_rate_base ) + this->video_step = 90000 * this->context->frame_rate_base / + this->context->frame_rate; + else +#endif + /* fallback to the VIDEO_PTS_MODE */ + this->video_step = 0; + } if (!this->av_frame->repeat_pict) img->duration = this->video_step; |