[vlc-devel] Question about video FPS probing in AVFormat demuxer
Vittorio Giovara
vittorio.giovara at gmail.com
Mon Mar 10 14:45:42 CET 2014
r_frame_rate si a deprecated field and its interpretation is 99% wrong. You should use avg_frame_rate instead.
Regarding the question, time base is usually a more accurate source of information.
What problem were you trying to resolve?
Vittorio
From: 某因幡
Sent: lunedì, marzo 10, 2014 09:22 AM
To: Mailing list for VLC media player developers
Subject: [vlc-devel] Question about video FPS probing in AVFormat demuxer
Hi,
As the code piece below shows, when creating new ES, why using time base from codec not in stream, or it means something else here?
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -367,8 +367,8 @@ int OpenDemux( vlc_object_t *p_this )
# warning FIXME: implement palette transmission
#endif
psz_type = "video";
- fmt.video.i_frame_rate = cc->time_base.den;
- fmt.video.i_frame_rate_base = cc->time_base.num * __MAX( cc->ticks_per_frame, 1 );
+ fmt.video.i_frame_rate = s->r_frame_rate.den;
+ fmt.video.i_frame_rate_base = s->r_frame_rate.num;
fmt.video.i_sar_num = s->sample_aspect_ratio.num;
if (s->sample_aspect_ratio.num > 0)
fmt.video.i_sar_den = s->sample_aspect_ratio.den;
--
language: Chinese, Japanese, English
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140310/681b18b0/attachment.html>
More information about the vlc-devel
mailing list