Opened 13 years ago

Closed 13 years ago

#269 closed defect (fixed)

webm/libvpx Conversion bug

Reported by: yxmlines Owned by: Michael Niedermayer
Priority: important Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

D:\WinLinux\Minsys\temp\ffmpeg>gdb ffmpeg_g
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from D:\WinLinux\Minsys\temp\ffmpeg/ffmpeg_g.exe...done.
<mpg" "E:\Program Files\TSA\Resource\Movie\test5.webm"
Starting program: D:\WinLinux\Minsys\temp\ffmpeg/ffmpeg_g.exe -i "E:\Program Fil
es\TSA\Resource\Movie\op.mpg" "E:\Program Files\TSA\Resource\Movie\test5.webm"
[New Thread 4888.0x109c]
ffmpeg version git-N-30606-g40da61e, Copyright (c) 2000-2011 the FFmpeg develope
rs

built on Jun 7 2011 14:24:42 with gcc 4.5.2
configuration: --prefix=/ffmpeg2 --enable-gpl --enable-version3 --enable-nonfr

ee --enable-postproc --arch=x86 --cpu=i686 --enable-w32threads --enable-runtime-
cpudetect --enable-hardcoded-tables --enable-memalign-hack --enable-avisynth --e
nable-bzlib --enable-frei0r --enable-libaacplus --enable-libopencore-amrnb --ena
ble-libopencore-amrwb --enable-libdirac --enable-libfaac --enable-libfreetype --
enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-
libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-amrwbenc --e
nable-libvorbis --enable-libvpx --enable-libxvid --enable-libxavs --enable-libx2
64 --enable-zlib --enable-libopencv --enable-librtmp --extra-libs='-lrtmp -lpola
rssl -lws2_32 -lwinmm' --disable-decoder=vp8

libavutil 51. 6. 1 / 51. 6. 1
libavcodec 53. 6. 1 / 53. 6. 1
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 14. 0 / 2. 14. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0

[mpeg @ 24ccd360] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from 'E:\Program Files\TSA\Resource\Movie\op.mpg':

Duration: 00:01:49.89, start: 0.395178, bitrate: 7120 kb/s

Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 1

04857 kb/s, 30 fps, 30 tbr, 90k tbn, 30 tbc

Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s

[buffer @ 2584d680] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[libvpx @ 24ce1fe0] v0.9.6
[libvorbis @ 2584d260] The requested thread algorithm is not supported with this

thread library.

Output #0, webm, to 'E:\Program Files\TSA\Resource\Movie\test5.webm':

Metadata:

encoder : Lavf53.2.0
Stream #0.0: Video: libvpx, yuv420p, 640x480 [PAR 1:1 DAR 4:3], q=2-31, 200

kb/s, 1k tbn, 30 tbc

Stream #0.1: Audio: libvorbis, 48000 Hz, stereo, s16, 64 kb/s

Stream mapping:

Stream #0.0 -> #0.0
Stream #0.1 -> #0.1

Press [q] to stop, ? for help
frame= 36 fps= 0 q=0.0 size= 4kB time=00:00:00.18 bitrate= 191.8kbits/s
frame= 46 fps= 45 q=0.0 size= 4kB time=00:00:00.69 bitrate= 50.5kbits/s
frame= 54 fps= 35 q=0.0 size= 37kB time=00:00:00.95 bitrate= 318.0kbits/s
frame= 64 fps= 31 q=0.0 size= 68kB time=00:00:01.33 bitrate= 416.1kbits/s
frame= 73 fps= 28 q=0.0 size= 81kB time=00:00:01.63 bitrate= 404.2kbits/s
frame= 82 fps= 26 q=0.0 size= 128kB time=00:00:01.93 bitrate= 542.1kbits/s
frame= 90 fps= 25 q=0.0 size= 160kB time=00:00:02.20 bitrate= 595.5kbits/s
frame= 99 fps= 24 q=0.0 size= 174kB time=00:00:02.50 bitrate= 570.9kbits/s
frame= 106 fps= 18 q=0.0 Lsize= 309kB time=00:00:02.90 bitrate= 872.3kbits/
s
video:285kB audio:18kB global headers:4kB muxing overhead 0.871596%

Program received signal SIGSEGV, Segmentation fault.
0x0095981d in av_next_option (obj=0x258832e0) at libavutil/opt.c:48

48 else if (last
!(*(AVClass)obj)->option->name) return NULL;

ps:git://git.videolan.org/ffmpeg.git

Change History (4)

comment:1 by yxmlines, 13 years ago

Status: newopen

comment:2 by yxmlines, 13 years ago

ps:diff --git a/libavutil/opt.c b/libavutil/opt.c
index f3c74a9..df4b70c 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -45,7 +45,7 @@ const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mas

const AVOption *av_next_option(void *obj, const AVOption *last)
{

if (last && last[1].name) return ++last;

else if (last
!(*(AVClass)obj)->option->name) return NULL;

+ else if (last) return NULL;

else return (*(AVClass)obj)->option;

}

Program received signal SIGSEGV, Segmentation fault.
0x009850f1 in av_next_option (obj=0x56d32e0) at libavutil/opt.c:49
49 else return (*(AVClass)obj)->option;

comment:3 by Carl Eugen Hoyos, 13 years ago

Cc: mingw-gcc-4.5.2-tdm-1 removed
Component: FFmpegundetermined
Priority: normalimportant
Reproduced by developer: set
Version: gitgit-master

This is a regression.

(gdb) r -i tests/lena.pnm out.webm
ffmpeg version git-N-30606-g40da61e, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun  7 2011 12:59:16 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-libvpx --enable-libvorbis
  libavutil    51.  6. 1 / 51.  6. 1
  libavcodec   53.  6. 1 / 53.  6. 1
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 14. 0 /  2. 14. 0
  libswscale    0. 14. 1 /  0. 14. 1
Input #0, image2, from 'tests/lena.pnm':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'libvpx', auto-selecting format 'yuv420p'
[buffer @ 0x1262980] w:256 h:256 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[ffsink @ 0x126b020] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x1265d20] w:256 h:256 fmt:rgb24 -> w:256 h:256 fmt:yuv420p flags:0x4
[libvpx @ 0x1262fc0] v0.9.6
Output #0, webm, to 'out.webm':
  Metadata:
    encoder         : Lavf53.2.0
    Stream #0.0: Video: libvpx, yuv420p, 256x256, q=2-31, 200 kb/s, 1k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
frame=    1 fps=  0 q=0.0 Lsize=      11kB time=00:00:00.04 bitrate=2320.0kbits/s
video:11kB audio:0kB global headers:0kB muxing overhead 4.260291%

Program received signal SIGSEGV, Segmentation fault.
0x000000000093bac3 in av_next_option (last=0x0, obj=<value optimized out>) at libavutil/opt.c:48
48          else if (last || !(*(AVClass**)obj)->option->name) return NULL;
(gdb) bt
#0  0x000000000093bac3 in av_next_option (last=0x0, obj=<value optimized out>) at libavutil/opt.c:48
#1  av_opt_free (last=0x0, obj=<value optimized out>) at libavutil/opt.c:526
#2  0x0000000000786f1a in avcodec_close (avctx=0x1262fc0) at libavcodec/utils.c:862
#3  0x000000000040d427 in transcode (nb_output_files=1, input_files=0x1269dc0, nb_input_files=1, stream_maps=0x0, nb_stream_maps=<value optimized out>, output_files=0xd05c40) at ffmpeg.c:2781
#4  0x0000000000411bad in main (argc=<value optimized out>, argv=<value optimized out>) at ffmpeg.c:4551
(gdb) disass $pc-32 $pc+20
Dump of assembler code from 0x93baa3 to 0x93bad7:
0x000000000093baa3 <av_opt_free+35>:    clc
0x000000000093baa4 <av_opt_free+36>:    (bad)
0x000000000093baa5 <av_opt_free+37>:    je     0x93baac <av_opt_free+44>
0x000000000093baa7 <av_opt_free+39>:    cmp    $0x5,%eax
0x000000000093baaa <av_opt_free+42>:    jne    0x93ba90 <av_next_option>
0x000000000093baac <av_opt_free+44>:    movslq 0x10(%rbx),%rdi
0x000000000093bab0 <av_opt_free+48>:    lea    0x0(%rbp,%rdi,1),%rdi
0x000000000093bab5 <av_opt_free+53>:    callq  0x939610 <av_freep>
0x000000000093baba <av_next_option+42>: test   %rbx,%rbx
0x000000000093babd <av_next_option+45>: jne    0x93ba95 <av_next_option+5>
0x000000000093babf <av_next_option+47>: mov    0x0(%rbp),%rax
0x000000000093bac3 <av_next_option+51>: mov    0x10(%rax),%rbx
0x000000000093bac7 <av_next_option+55>: cmpq   $0x0,(%rbx)
0x000000000093bacb <av_next_option+59>: jne    0x93ba9f <av_opt_free+31>
0x000000000093bacd <av_next_option+61>: nopl   (%rax)
0x000000000093bad0 <av_opt_free+80>:    add    $0x8,%rsp
0x000000000093bad4 <av_opt_free+84>:    pop    %rbx
0x000000000093bad5 <av_opt_free+85>:    pop    %rbp
0x000000000093bad6 <av_opt_free+86>:    retq
End of assembler dump.
(gdb) info register
rax            0x0      0
rbx            0x0      0
rcx            0x7af0   31472
rdx            0x12942c0        19481280
rsi            0x0      0
rdi            0x1263740        19281728
rbp            0x1263740        0x1263740
rsp            0x7fffffffcd50   0x7fffffffcd50
r8             0x0      0
r9             0x7ffff6506eb0   140737325854384
r10            0x7ffff6506eb0   140737325854384
r11            0x206    518
r12            0x0      0
r13            0x126b420        19313696
r14            0xffffffff       4294967295
r15            0x0      0
rip            0x93bac3 0x93bac3 <av_next_option+51>
eflags         0x10246  [ PF ZF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
fctrl          0x37f    895
fstat          0x0      0
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
mxcsr          0x1fa0   [ PE IM DM ZM OM UM PM ]

comment:4 by Michael Niedermayer, 13 years ago

Resolution: fixed
Status: openclosed

Fixed locally will push in a moment

Note: See TracTickets for help on using tickets.