summaryrefslogtreecommitdiff
path: root/command/streaminfo.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-11-22 22:08:27 +0100
committerJochen Dolze <vdr@dolze.de>2010-11-22 22:08:27 +0100
commit83de61beb75c5554ec5773f63840990584d5da57 (patch)
treed789573a77fd0c0fc0b287a073193b4087df2753 /command/streaminfo.cpp
parent2e9d23ab5e3cc12ce58042afdc2d77d098fd498e (diff)
downloadvdr-plugin-markad-83de61beb75c5554ec5773f63840990584d5da57.tar.gz
vdr-plugin-markad-83de61beb75c5554ec5773f63840990584d5da57.tar.bz2
Added SeekPATPMT when there is no PAT/PMT on start of the TS-recording
Added info about nalu filler Made demuxer more fault tolerant
Diffstat (limited to 'command/streaminfo.cpp')
-rw-r--r--command/streaminfo.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/command/streaminfo.cpp b/command/streaminfo.cpp
index 4de2665..e52ca0b 100644
--- a/command/streaminfo.cpp
+++ b/command/streaminfo.cpp
@@ -120,7 +120,6 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt,
if (nalu==NAL_AUD)
{
- if (!maContext->Video.Info.Width) return false;
if (pkt[5]==0x10)
{
maContext->Video.Info.Pict_Type=MA_I_TYPE;
@@ -139,19 +138,19 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt,
int nal_len = nalUnescape(nal_data, pkt + 5, len - 5);
cBitStream bs(nal_data, nal_len);
- int profile_idc, pic_order_cnt_type, i, j;
-
uint32_t width=0;
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
+ int profile_idc = bs.getU8(); // profile_idc
bs.skipBits(8); // constraint_setN_flags and reserved_zero_Nbits
bs.skipBits(8); // level_idc
bs.skipUeGolomb(); // seq_parameter_set_id
+ int i,j;
+
if ((profile_idc == 100) || (profile_idc == 110) || (profile_idc == 122) || (profile_idc == 244) ||
(profile_idc==44) || (profile_idc==83) || (profile_idc==86))
{
@@ -179,7 +178,7 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt,
}
// H264.log2_max_frame_num=bs.getUeGolomb()+4;
bs.skipUeGolomb(); // log2_max_frame_num_minus4
- pic_order_cnt_type = bs.getUeGolomb(); // pic_order_cnt_type
+ int pic_order_cnt_type = bs.getUeGolomb(); // pic_order_cnt_type
if (pic_order_cnt_type == 0)
bs.skipUeGolomb(); // log2_max_pic_order_cnt_lsb_minus4
else if (pic_order_cnt_type == 1)