From f1540fe05ee15d1f53fe30e137931b185b791821 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Sat, 15 Dec 2012 18:53:49 +1100 Subject: [PATCH] Temporary fix for stuttery playback of AVI files over Storage Group. This is a reverse of ffmpeg SHA1:8df774be88c347c40f1b2411ed9e391dfec0ebb7 http://git.videolan.org/?p=ffmpeg.git;a=commit;h=8df774be88c347c40f1b2411ed9e391dfec0ebb7 This is not a proper fix. It only reveals an issue with myth Storage Group file ring buffer. With this ffmpeg change, some AVI files are detected as non-interleaved and the readahead thread starts to pull MB of data which saturates 100Mbit/s link causing the video playback to stutter. --- mythtv/external/FFmpeg/libavformat/avidec.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mythtv/external/FFmpeg/libavformat/avidec.c b/mythtv/external/FFmpeg/libavformat/avidec.c index 24aacd04fd0..008cd600375 100644 --- a/mythtv/external/FFmpeg/libavformat/avidec.c +++ b/mythtv/external/FFmpeg/libavformat/avidec.c @@ -1334,6 +1334,12 @@ static int guess_ni_flag(AVFormatContext *s){ first_end= st->index_entries[n-1].pos; } avio_seek(s->pb, oldpos, SEEK_SET); + + return (last_start > first_end); + +/* myth + + if (last_start > first_end) return 1; idx= av_mallocz(sizeof(*idx) * s->nb_streams); @@ -1360,6 +1366,9 @@ static int guess_ni_flag(AVFormatContext *s){ } av_free(idx); return 0; + + +*/ } static int avi_load_index(AVFormatContext *s)