diff options
author | Jochen Dolze <vdr@dolze.de> | 2010-09-24 23:02:39 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2010-09-24 23:02:39 +0200 |
commit | 05dff1022a467deec38f93b0987db9aeb2b43420 (patch) | |
tree | ba18b9ed88d11070b7100fd2d5a895737d14e330 /command/decoder.cpp | |
parent | 467feedc49246f6c2287c0e8a20a171596a9bba3 (diff) | |
download | vdr-plugin-markad-05dff1022a467deec38f93b0987db9aeb2b43420.tar.gz vdr-plugin-markad-05dff1022a467deec38f93b0987db9aeb2b43420.tar.bz2 |
Added support for libavcodec51 (see define in Makefile)
Lowered memory consumption on some cases
Enhanced buffer usage output
Diffstat (limited to 'command/decoder.cpp')
-rw-r--r-- | command/decoder.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/command/decoder.cpp b/command/decoder.cpp index 87619de..92ea1a0 100644 --- a/command/decoder.cpp +++ b/command/decoder.cpp @@ -7,6 +7,7 @@ #include <stdint.h> #include <sched.h> +#include <errno.h> #include <sys/types.h> #include <string.h> #include <cstdlib> @@ -39,7 +40,9 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) dest->palctrl = NULL; dest->slice_offset = NULL; dest->internal_buffer = NULL; +#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(18<<8)+0) dest->hwaccel = NULL; +#endif dest->execute = NULL; #if LIBAVCODEC_VERSION_INT >= ((52<<16)+(37<<8)+0) dest->execute2 = NULL; @@ -240,10 +243,11 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, bool useMP2, bool hasAC3) video_context->skip_idct=AVDISCARD_ALL; + av_log_set_level(AV_LOG_FATAL); // silence decoder output + if (video_codecid==CODEC_ID_H264) { video_context->flags2|=CODEC_FLAG2_CHUNKS; // needed for H264! - av_log_set_level(AV_LOG_FATAL); // H264 decoder is very chatty } else { @@ -292,7 +296,11 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, bool useMP2, bool hasAC3) } else { +#if LIBAVCODEC_VERSION_INT < ((51<<16)+(55<<8)+0) + isyslog("using codec %s",video_codec->name); +#else isyslog("using codec %s",video_codec->long_name); +#endif #if LIBAVCODEC_VERSION_INT >= ((52<<16)+(22<<8)+2) if (video_context->hwaccel) |