[vlc-devel] commit: Fixed filter_chain_GetFmtOut to really return the output value when ( Laurent Aimar )

git version control git at videolan.org
Sun Aug 3 14:53:33 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Aug  3 14:54:44 2008 +0200| [4db98423b6f012ecb1141fc46dc0eca85480c341] | committer: Laurent Aimar 

Fixed filter_chain_GetFmtOut to really return the output value when
possible.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4db98423b6f012ecb1141fc46dc0eca85480c341
---

 src/misc/filter_chain.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 5397b06..a89c288 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -328,7 +328,18 @@ int filter_chain_GetLength( filter_chain_t *p_chain )
 
 const es_format_t *filter_chain_GetFmtOut( filter_chain_t *p_chain )
 {
-    return &p_chain->fmt_out;
+
+    if( p_chain->b_allow_fmt_out_change )
+        return &p_chain->fmt_out;
+
+    /* Unless filter_chain_Reset has been called we are doomed */
+    if( p_chain->filters.i_count <= 0 )
+        return &p_chain->fmt_out;
+
+    /* */
+    filter_t *p_last = (filter_t*)p_chain->filters.pp_elems[p_chain->filters.i_count-1];
+
+    return &p_last->fmt_out;
 }
 
 /**




More information about the vlc-devel mailing list