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

Reimar Döffinger git at videolan.org
Tue Nov 8 19:05:31 CET 2011


ffmpeg | branch: oldabi | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Wed Oct 19 18:41:02 2011 +0200| [661e0811760844fd03d2f5cfe74c5736bb4b8ecc] | 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=661e0811760844fd03d2f5cfe74c5736bb4b8ecc
---

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

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 54f42cd..e52d4b1 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -212,7 +212,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