Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > e74854145de212e885429b98fe2823f1 > files > 2

ffmpeg-2.4.9-1.mga5.src.rpm

From 1cdca11fa3276f93ab7283fcdff354654772e624 Mon Sep 17 00:00:00 2001
From: elupus <elupus@xbmc.org>
Date: Tue, 1 Nov 2011 20:18:35 +0100
Subject: [PATCH] add public version of ff_read_frame_flush

We need this since we sometimes seek on the
input stream behind ffmpeg's back. After this
all data need to be flushed completely.
[anssi@mageia.org: modified func name + doxy to signify unofficial patch]
---
 libavformat/avformat.h | 5 +++++
 libavformat/utils.c    | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index b915148..64695c6 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2112,6 +2112,11 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt);
 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
 
 /**
+ * Clear out any buffered data in context (for Kodi use only, unofficial patch)
+ */
+void av_read_frame_flush_mga_kodi_mod(AVFormatContext *s);
+
+/**
  * Seek to the keyframe at timestamp.
  * 'timestamp' in 'stream_index'.
  *
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 9f74313..8de7c3d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1580,6 +1580,11 @@ void ff_read_frame_flush(AVFormatContext *s)
     }
 }
 
+void av_read_frame_flush_mga_kodi_mod(AVFormatContext *s)
+{
+  ff_read_frame_flush(s);
+}
+
 void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
 {
     int i;