diff --git a/libeplayer3/container/container_ffmpeg.c b/libeplayer3/container/container_ffmpeg.c index fb69ca1..549debb 100644 --- a/libeplayer3/container/container_ffmpeg.c +++ b/libeplayer3/container/container_ffmpeg.c @@ -523,7 +523,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 fc21479..cf3f15e 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: {