From 317fd701ea2ab497a8db65e84860178634b638f0 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 18 Jan 2020 00:10:20 +0100 Subject: [PATCH] ffmpegdec: fix ogg stream play Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/cc0b561ed51ced1d272325dd17dadd52f6100b5d Author: Jacek Jendrzej Date: 2020-01-18 (Sat, 18 Jan 2020) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/audiodec/ffmpegdec.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index e0a549d5f..2bad5d34b 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -152,12 +152,11 @@ bool CFfmpegDec::Init(void *_in, const CFile::FileType /* ft */) return false; } - if (is_stream) + if (is_stream){ avc->probesize = 128 * 1024; - - av_opt_set_int(avc, "analyzeduration", 1000000, 0); - - avioc = avio_alloc_context (buffer, buffer_size, 0, this, read_packet, NULL, seek_packet); + av_opt_set_int(avc, "analyzeduration", 1000000, 0); + } + avioc = avio_alloc_context (buffer, buffer_size, 0, this, read_packet, NULL, !is_stream ? seek_packet:NULL); if (!avioc) { av_freep(&buffer); avformat_free_context(avc);