[FFmpeg-cvslog] Do not call parse_keyframes_index with NULL stream.

Reimar Döffinger git at videolan.org
Mon Nov 21 19:59:15 CET 2011


ffmpeg | branch: release/0.7 | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Wed Oct 19 18:41:02 2011 +0200| [54e4bf32968546cee1b3842ada696763ee0d4a48] | committer: Carl Eugen Hoyos

Do not call parse_keyframes_index with NULL stream.

Seems to fix trac issue #569.
Sample is unfortunately not available, but it might be caused by
an index existing for non-existing audio stream (?).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
(cherry picked from commit 6ea6ff053af2aff8a9a898292f9640efa9290c9f)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=54e4bf32968546cee1b3842ada696763ee0d4a48
---

 libavformat/flvdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index a2a3c5c..c48224b 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -210,7 +210,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
         case AMF_DATA_TYPE_OBJECT: {
             unsigned int keylen;
 
-            if (ioc->seekable && key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
+            if (vstream && ioc->seekable && key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
                 if (parse_keyframes_index(s, ioc, vstream, max_pos) < 0)
                     av_log(s, AV_LOG_ERROR, "Keyframe index parsing failed\n");
 



More information about the ffmpeg-cvslog mailing list