libeplayer3/container_ffmpeg: don't flush instead of clear

Origin commit data
------------------
Branch: master
Commit: c9e0755f02
Author: martii <m4rtii@gmx.de>
Date: 2013-07-27 (Sat, 27 Jul 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-07-27 12:24:50 +02:00
parent 6a0f006a0c
commit d5e47e3e69
2 changed files with 7 additions and 5 deletions

View File

@@ -521,7 +521,7 @@ static void FFMPEGThread(Context_t *context) {
avcodec_free_frame(&decoded_frame); avcodec_free_frame(&decoded_frame);
decoded_frame = NULL; decoded_frame = NULL;
} }
context->output->Command(context, OUTPUT_FLUSH, NULL); context->output->Command(context, OUTPUT_CLEAR, NULL);
context->output->Command(context, OUTPUT_PLAY, NULL); context->output->Command(context, OUTPUT_PLAY, NULL);
} }

View File

@@ -473,18 +473,18 @@ int LinuxDvbFlush(Context_t *context __attribute__((unused)), char * type) {
getLinuxDVBMutex(FILENAME, __FUNCTION__,__LINE__); getLinuxDVBMutex(FILENAME, __FUNCTION__,__LINE__);
if (video && videofd != -1) { 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("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 (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("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: { case OUTPUT_CLEAR: {
ret = LinuxDvbClear(context, (char*)argument); ret = LinuxDvbClear(context, (char*)argument);
reset(context);
sCURRENT_PTS = 0;
break; break;
} }
case OUTPUT_PTS: { case OUTPUT_PTS: {