diff --git a/libeplayer3/container/container_ffmpeg.c b/libeplayer3/container/container_ffmpeg.c index 947b9ce..493e6d5 100644 --- a/libeplayer3/container/container_ffmpeg.c +++ b/libeplayer3/container/container_ffmpeg.c @@ -36,6 +36,9 @@ #include #include #include +#ifdef MARTII +#include +#endif #include #include @@ -329,6 +332,12 @@ static char* searchMeta(AVDictionary * metadata, char* ourTag) /* **************************** */ static void FFMPEGThread(Context_t *context) { +#ifdef MARTII + char threadname[17]; + strncpy(threadname, __func__, sizeof(threadname)); + threadname[16] = 0; + prctl (PR_SET_NAME, (unsigned long)&threadname); +#endif AVPacket packet; off_t currentReadPosition = 0; /* last read position */ off_t lastReverseSeek = 0; /* max address to read before seek again in reverse play */ @@ -1504,6 +1513,10 @@ static int container_ffmpeg_stop(Context_t *context) { ffmpeg_err("Container not running\n"); return cERR_CONTAINER_FFMPEG_ERR; } +#ifdef MARTII + if (context->playback) + context->playback->isPlaying = 0; +#endif while ( (hasPlayThreadStarted != 0) && (--wait_time) > 0 ) { ffmpeg_printf(10, "Waiting for ffmpeg thread to terminate itself, will try another %d times\n", wait_time);