summaryrefslogtreecommitdiff
path: root/command/streaminfo.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2012-01-12 21:31:55 +0100
committerJochen Dolze <vdr@dolze.de>2012-01-12 21:31:55 +0100
commit2ea9f6a076666fb6128c60872a4803cdda6a4a2f (patch)
tree72a4277fac72edbb386d76a9a203b0a927cdf0c3 /command/streaminfo.cpp
parentc7515e1d85371141c7822555e2997aee8f4dc70b (diff)
downloadvdr-plugin-markad-2ea9f6a076666fb6128c60872a4803cdda6a4a2f.tar.gz
vdr-plugin-markad-2ea9f6a076666fb6128c60872a4803cdda6a4a2f.tar.bz2
Added bugfix-contribution from bug #847
Diffstat (limited to 'command/streaminfo.cpp')
-rw-r--r--command/streaminfo.cpp9
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