From 2ea9f6a076666fb6128c60872a4803cdda6a4a2f Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Thu, 12 Jan 2012 21:31:55 +0100 Subject: Added bugfix-contribution from bug #847 --- command/streaminfo.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'command') diff --git a/command/streaminfo.cpp b/command/streaminfo.cpp index 874ba8f..63ddde5 100644 --- a/command/streaminfo.cpp +++ b/command/streaminfo.cpp @@ -252,9 +252,16 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt, if (num_units_in_tick > 0) { frame_rate = time_scale / num_units_in_tick; - if (frame_mbs_only_flag) frame_rate/=2; + if (frame_mbs_only_flag) { + frame_rate/=2; + } else { + if (pic_order_cnt_type!=2) frame_rate/=2; + } } fixedframerate=bs.getBit(); // fixed_frame_rate_flag + if ((fixedframerate==1) && (frame_rate!=0)) { + maContext->Video.Info.FramesPerSecond=frame_rate; + } } #if 0 int nal_hrd_parameters_present_flag = bs.getBit(); // nal_hrd_parameters_present_flag -- cgit v1.2.3