summaryrefslogtreecommitdiff
path: root/decoder.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-03-21 21:20:38 +0100
committerJochen Dolze <vdr@dolze.de>2010-03-21 21:20:38 +0100
commit099d40410a489ff9c0c6d48661c3ae96b92b8b4e (patch)
tree00117742bf891a615e65a03c7b4f9b4802405d4c /decoder.cpp
parent58ce63f95804bdc642c4f39f985763c22e781de3 (diff)
downloadvdr-plugin-markad-099d40410a489ff9c0c6d48661c3ae96b92b8b4e.tar.gz
vdr-plugin-markad-099d40410a489ff9c0c6d48661c3ae96b92b8b4e.tar.bz2
Added mark type
Diffstat (limited to 'decoder.cpp')
-rw-r--r--decoder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/decoder.cpp b/decoder.cpp
index a8c8c07..6187084 100644
--- a/decoder.cpp
+++ b/decoder.cpp
@@ -278,6 +278,7 @@ cMarkAdDecoder::~cMarkAdDecoder()
bool cMarkAdDecoder::DecodeMP2(MarkAdContext *maContext, uchar *espkt, int eslen)
{
if (!mp2_context) return false;
+ maContext->Audio.Data.Valid=false;
AVPacket avpkt;
#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(25<<8)+0)
av_init_packet(&avpkt);
@@ -332,6 +333,7 @@ bool cMarkAdDecoder::SetAudioInfos(MarkAdContext *maContext, AVCodecContext *Aud
bool cMarkAdDecoder::DecodeAC3(MarkAdContext *maContext, uchar *espkt, int eslen)
{
if (!ac3_context) return false;
+ maContext->Audio.Data.Valid=false;
AVPacket avpkt;
#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(25<<8)+0)
av_init_packet(&avpkt);
@@ -380,13 +382,13 @@ void cMarkAdDecoder::PAR2DAR(AVRational a, AVRational *erg)
bool cMarkAdDecoder::SetVideoInfos(MarkAdContext *maContext,AVCodecContext *Video_Context, AVFrame *Video_Frame)
{
if ((!maContext) || (!Video_Context) || (!Video_Frame)) return false;
- maContext->Video.Data.Valid=false;
for (int i=0; i<4; i++)
{
if (Video_Frame->data[i])
{
maContext->Video.Data.Plane[i]=Video_Frame->data[i];
maContext->Video.Data.PlaneLinesize[i]=Video_Frame->linesize[i];
+ maContext->Video.Data.Valid=true;
}
}
maContext->Video.Info.Height=Video_Context->height;
@@ -398,13 +400,13 @@ bool cMarkAdDecoder::SetVideoInfos(MarkAdContext *maContext,AVCodecContext *Vide
maContext->Video.Info.AspectRatio.Num=dar.num;
maContext->Video.Info.AspectRatio.Den=dar.den;
- maContext->Video.Data.Valid=true;
return true;
}
bool cMarkAdDecoder::DecodeVideo(MarkAdContext *maContext,uchar *pkt, int plen)
{
if (!video_context) return false;
+ maContext->Video.Data.Valid=false;
if ((video_context->codec_id==CODEC_ID_H264) && (!video_context->skip_frame))
{