[FFmpeg-trac] #569(avformat:new): segfault trying to identify flv with no audio channels

FFmpeg trac at avcodec.org
Wed Oct 19 16:31:23 CEST 2011


#569: segfault trying to identify flv with no audio channels
-------------------------------------+------------------------------------
             Reporter:  andrewr      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by andrewr):

 The above patch doesn't apply cleanly. But this modified one does, is this
 what you meant? In particular there was a missing parens and I'm not sure
 if the '&& depth == 1' needs to be preserved.

 This patch below does fix the issue!

 {{{
 --- a/libavformat/flvdec.c
 +++ b/libavformat/flvdec.c
 @@ -228,7 +228,7 @@ static int amf_parse_object(AVFormatContext *s,
 AVStream *as
          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))
                  if (parse_keyframes_index(s, ioc, vstream, max_pos) < 0)
                      av_log(s, AV_LOG_ERROR, "Keyframe index parsing
 failed\n");
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/569#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list