diff options
-rw-r--r-- | decoder.cpp | 7 | ||||
-rw-r--r-- | decoder.h | 4 | ||||
-rw-r--r-- | queue.h | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/decoder.cpp b/decoder.cpp index 1277825..6b01404 100644 --- a/decoder.cpp +++ b/decoder.cpp @@ -42,6 +42,11 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, bool useMP2, bool hasAC3) return; } + if (((ver >> 16)<52) && (useH264)) + { + esyslog("dont report bugs about H264, use libavcodec >= 52 instead!"); + } + if (useMP2) { CodecID mp2_codecid=CODEC_ID_MP2; @@ -202,10 +207,12 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, bool useMP2, bool hasAC3) { isyslog("using codec %s",video_codec->long_name); +#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(22<<8)+2) if (video_context->hwaccel) { isyslog("using hwaccel %s",video_context->hwaccel->name); } +#endif video_frame = avcodec_alloc_frame(); if (!video_frame) @@ -30,6 +30,10 @@ extern "C" { #include <libavcodec/avcodec.h> +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) +#warning H264 parsing may be broken, better use libavcodec52 +#endif + #if LIBAVCODEC_VERSION_INT < ((52<<16)+(23<<8)+0) #include <libavformat/avformat.h> #endif @@ -119,7 +119,7 @@ private: int inptr; int outptr; - unsigned long scanner; + uint32_t scanner; int scannerstart; int FindPktHeader(int Start, int *StreamSize,int *SyncSize, bool LongStartCode); |