diff options
Diffstat (limited to 'command/streaminfo.cpp')
-rw-r--r-- | command/streaminfo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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 |