diff options
author | Jochen Dolze <vdr@dolze.de> | 2010-10-03 23:30:02 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2010-10-03 23:30:02 +0200 |
commit | 711def8f20707e2816c957d5d4edb8952b0876e6 (patch) | |
tree | 6b20a3570be535aabaae870d0104b0b165731429 /command/streaminfo.cpp | |
parent | 190b1e31a688117783b09a6edbbb15257655b9c2 (diff) | |
download | vdr-plugin-markad-711def8f20707e2816c957d5d4edb8952b0876e6.tar.gz vdr-plugin-markad-711def8f20707e2816c957d5d4edb8952b0876e6.tar.bz2 |
Added better detection for transparent logos, new logo filename scheme!
Diffstat (limited to 'command/streaminfo.cpp')
-rw-r--r-- | command/streaminfo.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/command/streaminfo.cpp b/command/streaminfo.cpp index 583be70..94a044e 100644 --- a/command/streaminfo.cpp +++ b/command/streaminfo.cpp @@ -168,6 +168,7 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt, uint32_t height=0; uint32_t aspect_ratio_idc=0; double frame_rate=0; + int sar_width=1,sar_height=1; profile_idc = bs.getU8(); // profile_idc bs.skipBits(8); // constraint_setN_flags and reserved_zero_Nbits @@ -244,8 +245,8 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt, aspect_ratio_idc = bs.getU8(); // aspect_ratio_idc if (aspect_ratio_idc == 255) // extended sar { - bs.skipBits(16); // sar_width - bs.skipBits(16); // sar_height + sar_width=bs.getBits(16); // sar_width + sar_height=bs.getBits(16); // sar_height } } if (bs.getBit()) // overscan_info_present_flag @@ -343,6 +344,7 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt, switch (aspect_ratio_idc) { case 1: + // square pixel maContext->Video.Info.AspectRatio.Num=1; maContext->Video.Info.AspectRatio.Den=1; @@ -430,6 +432,11 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt, maContext->Video.Info.AspectRatio.Num=2; maContext->Video.Info.AspectRatio.Den=1; break; + case 255: + // extended SAR + maContext->Video.Info.AspectRatio.Num=sar_width; + maContext->Video.Info.AspectRatio.Den=sar_height; + break; } } } |