diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-09-27 22:40:45 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-09-27 22:40:45 +0200 |
commit | c51d2148c69cdda76f5b72e25a52c73c2b319f95 (patch) | |
tree | d259b20c39547b4a6f676685952ce47314a7f8aa /video.cpp | |
parent | 577280a1796e5cf90d5eb05d2232690ab83f0bd8 (diff) | |
download | vdr-plugin-markad-c51d2148c69cdda76f5b72e25a52c73c2b319f95.tar.gz vdr-plugin-markad-c51d2148c69cdda76f5b72e25a52c73c2b319f95.tar.bz2 |
Fixed handling of asprintf result
Diffstat (limited to 'video.cpp')
-rw-r--r-- | video.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -223,8 +223,7 @@ MarkAdMark *cMarkAdVideo::Process(int LastIFrame) if ((hret>0) && (borderiframe)) { char *buf=NULL; - asprintf(&buf,"detected start of horiz. borders (%i)",borderiframe); - if (buf) + if (asprintf(&buf,"detected start of horiz. borders (%i)",borderiframe)!=-1) { isyslog("markad [%i]: %s",recvnumber,buf); AddMark(borderiframe,buf); @@ -235,8 +234,7 @@ MarkAdMark *cMarkAdVideo::Process(int LastIFrame) if ((hret<0) && (borderiframe)) { char *buf=NULL; - asprintf(&buf,"detected stop of horiz. borders (%i)",borderiframe); - if (buf) + if (asprintf(&buf,"detected stop of horiz. borders (%i)",borderiframe)!=-1) { isyslog("markad [%i]: %s",recvnumber,buf); AddMark(borderiframe,buf); @@ -248,11 +246,10 @@ MarkAdMark *cMarkAdVideo::Process(int LastIFrame) if (AspectRatioChange(&macontext->Video.Info.AspectRatio,&aspectratio)) { char *buf=NULL; - asprintf(&buf,"aspect ratio change from %i:%i to %i:%i (%i)", + if (asprintf(&buf,"aspect ratio change from %i:%i to %i:%i (%i)", aspectratio.Num,aspectratio.Den, macontext->Video.Info.AspectRatio.Num, - macontext->Video.Info.AspectRatio.Den,LastIFrame); - if (buf) + macontext->Video.Info.AspectRatio.Den,LastIFrame)!=-1) { isyslog("markad [%i]: %s",recvnumber, buf); AddMark(LastIFrame,buf); |