summaryrefslogtreecommitdiff
path: root/recv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'recv.cpp')
-rw-r--r--recv.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/recv.cpp b/recv.cpp
index f0cd2c5..04a2c17 100644
--- a/recv.cpp
+++ b/recv.cpp
@@ -184,7 +184,15 @@ int cMarkAdReceiver::LastIFrame()
return 0;
}
}
- return Index->GetNextIFrame(Index->Last(),false,NULL,NULL,NULL,true);
+ int iframe=Index->GetNextIFrame(Index->Last(),false,NULL,NULL,NULL,true);
+ if (iframe>0)
+ {
+ return iframe;
+ }
+ else
+ {
+ return 0;
+ }
}
void cMarkAdReceiver::Activate(bool On)
@@ -316,8 +324,11 @@ void cMarkAdReceiver::Action()
decoder->FindVideoInfos(&macontext,pkt,pktlen);
if (decoder->DecodeVideo(&macontext,pkt,pktlen))
{
- mark=video->Process(lastiframe);
- AddMark(mark,3);
+ if (macontext.Video.Info.Pict_Type==MA_I_TYPE)
+ {
+ mark=video->Process(lastiframe);
+ AddMark(mark,3);
+ }
}
}
tspkt+=len;