summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command/decoder.cpp12
-rw-r--r--plugin/setup.cpp8
-rw-r--r--plugin/status.cpp2
3 files changed, 20 insertions, 2 deletions
diff --git a/command/decoder.cpp b/command/decoder.cpp
index 4b207a1..ed81b37 100644
--- a/command/decoder.cpp
+++ b/command/decoder.cpp
@@ -152,7 +152,11 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, int Threads)
}
video_codec=NULL;
+#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(51<<8)+100)
+ AVCodecID video_codecid;
+#else
CodecID video_codecid;
+#endif
if (useH264)
{
@@ -173,7 +177,11 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, int Threads)
if (video_codec)
{
+#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(51<<8)+100)
+ video_context = avcodec_alloc_context3(NULL);
+#else
video_context = avcodec_alloc_context();
+#endif
if (video_context)
{
if (video_codec->capabilities & CODEC_CAP_TRUNCATED)
@@ -323,7 +331,11 @@ bool cMarkAdDecoder::Clear()
{
avcodec_flush_buffers(video_context);
AVCodecContext *dest;
+#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(51<<8)+100)
+ dest=avcodec_alloc_context3(NULL);
+#else
dest=avcodec_alloc_context();
+#endif
if (dest)
{
if (avcodec_copy_context(dest,video_context)!=0) ret=false;
diff --git a/plugin/setup.cpp b/plugin/setup.cpp
index 8aad8f5..8835735 100644
--- a/plugin/setup.cpp
+++ b/plugin/setup.cpp
@@ -59,7 +59,7 @@ void cSetupMarkAd::write(void)
Add(new cMenuEditBoolItem(tr("log to recording directory"),&log2rec));
Add(new cMenuEditBoolItem(tr("hide mainmenu entry"),&hidemainmenuentry));
- if (current==-1)
+ if (current==-1)
{
SetCurrent(first);
}
@@ -68,7 +68,7 @@ void cSetupMarkAd::write(void)
SetCurrent(Get(current));
}
} else {
- lpos=-1;
+ lpos=-1;
}
Display();
}
@@ -114,6 +114,10 @@ eOSState cSetupMarkAd::ProcessKey(eKeys Key)
void cSetupMarkAd::Store(void)
{
SetupStore("Execution",processduring);
+ if (processduring!=0) {
+ whilerecording=1;
+ whilereplaying=1;
+ }
SetupStore("whileRecording",whilerecording);
SetupStore("whileReplaying",whilereplaying);
SetupStore("IgnoreMargins",nomargins);
diff --git a/plugin/status.cpp b/plugin/status.cpp
index 4fdf1be..a691477 100644
--- a/plugin/status.cpp
+++ b/plugin/status.cpp
@@ -56,6 +56,7 @@ bool cStatusMarkAd::Replaying()
void cStatusMarkAd::Replaying(const cControl *UNUSED(Control), const char *UNUSED(Name),
const char *UNUSED(FileName), bool On)
{
+ if (setup->ProcessDuring!=0) return;
if (setup->whileReplaying) return;
if (On)
{
@@ -130,6 +131,7 @@ void cStatusMarkAd::TimerChange(const cTimer *Timer, eTimerChange Change)
{
if (!Timer) return;
if (Change!=tcDel) return;
+ if (setup->ProcessDuring==2) return;
if (time(NULL)>=Timer->StopTime()) return; // don't react on normal VDR timer deletion after recording
Remove(Timer->File(),true);
}