[FFmpeg-trac] #3081(avcodec:new): Blackberry10 crash on avformat_find_stream_info

FFmpeg trac at avcodec.org
Fri Oct 25 08:09:19 CEST 2013


#3081: Blackberry10 crash on avformat_find_stream_info
-------------------------------------+-------------------------------------
             Reporter:  xsacha       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avcodec      |                  Version:  git-
             Keywords:  blackberry,  |  master
  qnx, crash, dict, avcodec          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 I noticed my device was '''randomly''' crashing in
 avformat_find_stream_info. The event was only reproducable on Blackberry10
 (did not occur on Windows or Android).

 I followed the codepath and determined that I was able to fix the crash by
 commenting out:
 https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/utils.c#L2750
 {{{
 av_dict_set(options ? &options[i] : &thread_opt, "threads", "1", 0);
 }}}

 I followed it further in to the avcodec_open2 function where I determined
 the crash could be fixed by commenting out:
 https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/utils.c#L1181
 {{{
 av_dict_copy(&tmp, *options, 0);
 }}}

 Commenting out anything that tmp was used in did not help. It only seemed
 to occur from the av_dict_copy.
 I was able to reproduce the crash using:
 {{{
 AVDictionary *foo = NULL; av_dict_copy(&foo, *options, 0);
 }}}

 My backtrace is uneventful as it doesn't seem to show anything from ffmpeg
 despite compiling with -g -O0: http://pastebin.com/jw2kdk4v

 How to reproduce:
 {{{
 While playing back an audio or video in PPSSPP, the application crashes
 randomly from avformat_find_stream_info.
 Using a recent ffmpeg-git built from github.com/hrydgard/ppsspp-ffmpeg-
 history
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/3081>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list