Updated 'get_stream_info' method to use correct 'ffprobe' output
authorThierry Florac <thierry.florac@onf.fr>
Tue, 08 Sep 2015 17:01:11 +0200
changeset 8 e42e04460e14
parent 7 b930c820b6cd
child 9 7c73df1106b4
Updated 'get_stream_info' method to use correct 'ffprobe' output
src/pyams_media/ffdocument.py
--- a/src/pyams_media/ffdocument.py	Tue Sep 08 17:00:34 2015 +0200
+++ b/src/pyams_media/ffdocument.py	Tue Sep 08 17:01:11 2015 +0200
@@ -46,7 +46,7 @@
 
     def get_stream_info(self, codec_type=None):
         """Get metadata info for given stream"""
-        for stream in self.__metadata__:
+        for stream in self.__metadata__.get('streams', ()):
             if (not codec_type) or (stream.get('codec_type') == codec_type):
                 return stream