summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoder.cpp7
-rw-r--r--decoder.h4
-rw-r--r--queue.h2
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)
diff --git a/decoder.h b/decoder.h
index 49bac5d..f35ddfe 100644
--- a/decoder.h
+++ b/decoder.h
@@ -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
diff --git a/queue.h b/queue.h
index a84901c..ef3eb0e 100644
--- a/queue.h
+++ b/queue.h
@@ -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);