From d5e47e3e69d6390ad8a6a48c41a8962bfdc5f259 Mon Sep 17 00:00:00 2001 From: martii Date: Sat, 27 Jul 2013 12:24:50 +0200 Subject: [PATCH] libeplayer3/container_ffmpeg: don't flush instead of clear Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/c9e0755f029bd9a7bc6856f8ca47701ffa988f51 Author: martii Date: 2013-07-27 (Sat, 27 Jul 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3/container/container_ffmpeg.c | 2 +- libeplayer3/output/linuxdvb.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libeplayer3/container/container_ffmpeg.c b/libeplayer3/container/container_ffmpeg.c index 9080da5..071172f 100644 --- a/libeplayer3/container/container_ffmpeg.c +++ b/libeplayer3/container/container_ffmpeg.c @@ -521,7 +521,7 @@ static void FFMPEGThread(Context_t *context) { avcodec_free_frame(&decoded_frame); decoded_frame = NULL; } - context->output->Command(context, OUTPUT_FLUSH, NULL); + context->output->Command(context, OUTPUT_CLEAR, NULL); context->output->Command(context, OUTPUT_PLAY, NULL); } diff --git a/libeplayer3/output/linuxdvb.c b/libeplayer3/output/linuxdvb.c index 6ae5437..5190bf3 100644 --- a/libeplayer3/output/linuxdvb.c +++ b/libeplayer3/output/linuxdvb.c @@ -473,18 +473,18 @@ int LinuxDvbFlush(Context_t *context __attribute__((unused)), char * type) { getLinuxDVBMutex(FILENAME, __FUNCTION__,__LINE__); if (video && videofd != -1) { - if (ioctl(videofd, VIDEO_CLEAR_BUFFER) == -1) + if (ioctl(videofd, VIDEO_FLUSH, NULL) == -1) { linuxdvb_err("ioctl failed with errno %d\n", errno); - linuxdvb_err("VIDEO_CLEAR_BUFFER: %s\n", strerror(errno)); + linuxdvb_err("VIDEO_FLUSH: %s\n", strerror(errno)); } } if (audio && audiofd != -1) { - if (ioctl(audiofd, AUDIO_CLEAR_BUFFER) == -1) + if (ioctl(audiofd, AUDIO_FLUSH, NULL) == -1) { linuxdvb_err("ioctl failed with errno %d\n", errno); - linuxdvb_err("AUDIO_CLEAR_BUFFER: %s\n", strerror(errno)); + linuxdvb_err("AUDIO_FLUSH: %s\n", strerror(errno)); } } @@ -1082,6 +1082,8 @@ static int Command(void *_context, OutputCmd_t command, void * argument) { } case OUTPUT_CLEAR: { ret = LinuxDvbClear(context, (char*)argument); + reset(context); + sCURRENT_PTS = 0; break; } case OUTPUT_PTS: {