[vlc-devel] commit: Do not reject rawvideo without a frame rate but use 25 instead. ( Laurent Aimar )
git version control
git at videolan.org
Fri Nov 7 12:30:22 CET 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Nov 7 11:52:32 2008 +0100| [68ae0c21f802a0f34315485b3e450b4baa6f8d26] | committer: Laurent Aimar
Do not reject rawvideo without a frame rate but use 25 instead.
The rawvideo stream may not be CFR but has a timestamp for every frame.
Anyway I prefer that we try to display the stream even with small glitches
than rejecting it.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68ae0c21f802a0f34315485b3e450b4baa6f8d26
---
modules/codec/rawvideo.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
index cfb4934..f0ed573 100644
--- a/modules/codec/rawvideo.c
+++ b/modules/codec/rawvideo.c
@@ -153,16 +153,16 @@ static int OpenDecoder( vlc_object_t *p_this )
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
+ date_Init( &p_sys->pts, p_dec->fmt_out.video.i_frame_rate,
+ p_dec->fmt_out.video.i_frame_rate_base );
if( p_dec->fmt_out.video.i_frame_rate == 0 ||
p_dec->fmt_out.video.i_frame_rate_base == 0)
{
- msg_Err( p_dec, "invalid frame rate %d/%d",
- p_dec->fmt_out.video.i_frame_rate,
- p_dec->fmt_out.video.i_frame_rate_base);
- return VLC_EGENERIC;
+ msg_Warn( p_dec, "invalid frame rate %d/%d, using 25 fps instead",
+ p_dec->fmt_out.video.i_frame_rate,
+ p_dec->fmt_out.video.i_frame_rate_base);
+ date_Init( &p_sys->pts, 25, 1 );
}
- date_Init( &p_sys->pts, p_dec->fmt_out.video.i_frame_rate,
- p_dec->fmt_out.video.i_frame_rate_base);
/* Find out p_vdec->i_raw_size */
vout_InitFormat( &p_dec->fmt_out.video, p_dec->fmt_in.i_codec,
More information about the vlc-devel
mailing list