[FFmpeg-trac] #2755(avcodec:new): avformat_find_stream_info crashes float register

FFmpeg trac at avcodec.org
Fri Jul 5 07:06:21 CEST 2013


#2755: avformat_find_stream_info crashes float register
-------------------------------------+-----------------------------------
             Reporter:  hxuanyu      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by hxuanyu):

 The code I used to put into main function of ffmpeg.c is

     AVFormatContext *pFormatCtx = NULL;
     if (avformat_open_input(&pFormatCtx, src_filename, NULL, NULL) < 0) {
         fprintf(stderr, "Could not open source file %s\n", src_filename);
         exit(1);
     }

     if (avformat_find_stream_info(pFormatCtx, NULL) < 0) {
         fprintf(stderr, "Could not find stream information\n");
         exit(1);
     }

     long double b = 2.12;
     printf("rhbc73 long double b=%Lf\n", b);
     long double d = b * b;
     printf("rhbc73 long double b=%Lf, d=%Lf", b, d);

 and the output from Mac was

     hello to play /Users/alex/Documents/sample-3gp-h263-amr.3gp
     rhbc73 long double b=nan
     rhbc73 long double b=2.120000, d=4.494400

 the output from Windows was
     hello to play c:\sample-3gp-h263-amr.3gp
     rhbc73 long double b=2.120000
     rhbc73 long double b=2.120000, d=4.494400

 notice that some values in Mac became nan

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


More information about the FFmpeg-trac mailing list