mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2025-03-01 10:39:28 +00:00
Fixed ATTA and DETA
Cleanup some code Testet GRAB funktions
This commit is contained in:
parent
40115f4fc6
commit
f80d757704
3
audio.c
3
audio.c
@ -1035,8 +1035,7 @@ static snd_pcm_t *AlsaOpenPCM(int passthrough)
|
||||
}
|
||||
// open none blocking; if device is already used, we don't want wait
|
||||
if ((err =
|
||||
snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK,
|
||||
SND_PCM_NONBLOCK)) < 0) {
|
||||
snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK,SND_PCM_NONBLOCK)) < 0) {
|
||||
Error(_("audio/alsa: playback open '%s' error: %s\n"), device, snd_strerror(err));
|
||||
return NULL;
|
||||
}
|
||||
|
12
codec.c
12
codec.c
@ -439,17 +439,19 @@ void CodecVideoOpen(VideoDecoder * decoder, int codec_id)
|
||||
*/
|
||||
void CodecVideoClose(VideoDecoder *video_decoder)
|
||||
{
|
||||
|
||||
AVFrame *frame;
|
||||
// FIXME: play buffered data
|
||||
// av_frame_free(&video_decoder->Frame); // callee does checks
|
||||
|
||||
Debug(3,"CodecVideoClose\n");
|
||||
if (video_decoder->VideoCtx) {
|
||||
pthread_mutex_lock(&CodecLockMutex);
|
||||
|
||||
// avcodec_send_packet(video_ctx, NULL);
|
||||
// while (avcodec_receive_frame(video_ctx,video_decoder->Frame) >= 0);
|
||||
|
||||
#if 1
|
||||
frame = av_frame_alloc();
|
||||
avcodec_send_packet(video_decoder->VideoCtx, NULL);
|
||||
while (avcodec_receive_frame(video_decoder->VideoCtx,frame) >= 0);
|
||||
av_frame_free(&frame);
|
||||
#endif
|
||||
avcodec_close(video_decoder->VideoCtx);
|
||||
av_freep(&video_decoder->VideoCtx);
|
||||
pthread_mutex_unlock(&CodecLockMutex);
|
||||
|
@ -1910,15 +1910,14 @@ int VideoDecodeInput(VideoStream * stream)
|
||||
}
|
||||
#if 0
|
||||
// clearing for normal channel switch has no advantage
|
||||
if (stream->ClearClose /*|| stream->ClosingStream */ ) {
|
||||
if (stream->ClearClose || stream->ClosingStream ) {
|
||||
int f;
|
||||
|
||||
// FIXME: during replay all packets are always checked
|
||||
|
||||
// flush buffers, if close is in the queue
|
||||
for (f = 0; f < filled; ++f) {
|
||||
if (stream->CodecIDRb[(stream->PacketRead + f) % VIDEO_PACKET_MAX]
|
||||
== AV_CODEC_ID_NONE) {
|
||||
if (stream->CodecIDRb[(stream->PacketRead + f) % VIDEO_PACKET_MAX] == AV_CODEC_ID_NONE) {
|
||||
if (f) {
|
||||
Debug(3, "video: cleared upto close\n");
|
||||
atomic_sub(f, &stream->PacketsFilled);
|
||||
|
Loading…
x
Reference in New Issue
Block a user