#44 closed defect (fixed)
seeking in .dv file with lowres enabled crashes ffplay
| Reported by: | ami_stuff | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git | Keywords: | dvvideo crash SIGSEGV lowres roundup |
| Cc: | cus@passwd.hu | Blocked By: | |
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
issue 2511
http://samples.mplayerhq.hu/DV-raw/small_test2.dv
C:\>C:\MinGW2\bin\gdb.exe ffplay
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 C:\ffplay.exe...(no debugging symbols found)...done.
(gdb) run -lowres 1 C:\small_test2.dv
Starting program: C:\ffplay.exe -lowres 1 C:\small_test2.dv
[New Thread 2184.0x850]
FFplay version SVN-r26400, Copyright (c) 2003-2011 the FFmpeg developers
built on Jan 18 2011 04:09:28 with gcc 4.4.2
configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
--enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack
--enable-shared --disable-static
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 1 / 0.16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.93. 0 / 52.93. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.74. 0 / 1.74. 0
libswscale 0.12. 0 / 0.12. 0
[New Thread 2184.0xecc]
[New Thread 2184.0x9f4]
[dv @ 01090050] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'C:\small_test2.dv':
Duration: 00:00:02.84, start: 0.000000, bitrate: 28800 kb/s
Stream #0.0: Video: dvvideo, yuv420p, 720x576, 28800 kb/s, PAR 16:15 DAR 4:3
, 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
Stream #0.2: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
[pcm_s16le @ 010a1b40] The maximum value for lowres supported by the decoder is
0
[New Thread 2184.0x410]
[New Thread 2184.0x7e4]
Seek to 52% ( 0:00:01) of total duration ( 0:00:02) f=0/0 0/0
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2184.0x9f4]
0x6495ef02 in dv_init_demux () from C:\avformat-52.dll
(gdb) bt
#0 0x6495ef02 in dv_init_demux () from C:\avformat-52.dll
#1 0x00000000 in ?? ()
(gdb)
Change History (7)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
| Reproduced by developer: | set |
|---|---|
| Status: | new → open |
(Seeking back.)
(gdb) r -an -lowres 1 small_test2.dv
Starting program: ffplay_g -an -lowres 1 small_test2.dv
[Thread debugging using libthread_db enabled]
FFplay version git-N-29061-g5c00687, Copyright (c) 2003-2011 the FFmpeg developers
built on Apr 12 2011 18:07:12 with gcc 4.5.2
configuration: --cc='/usr/local/gcc-4.5.2/bin/gcc -m32' --disable-asm
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.119. 0 / 52.119. 0
libavformat 52.106. 0 / 52.106. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 78. 0 / 1. 78. 0
libswscale 0. 13. 0 / 0. 13. 0
[New Thread 0xf78e3b70 (LWP 26676)]
[New Thread 0xf7014b70 (LWP 26677)]
[dv @ 0x8c3f580] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'small_test2.dv':
Duration: 00:00:02.84, start: 0.000000, bitrate: 28800 kb/s
Stream #0.0: Video: dvvideo, yuv420p, 720x576, 28800 kb/s, PAR 16:15 DAR 4:3, 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
Stream #0.2: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
[New Thread 0xf6786b70 (LWP 26678)]
[New Thread 0xf5f85b70 (LWP 26679)]
0.64 A-V: 0.000 s:0.0 aq= 0KB vq= 844KB sq= 0B f=0/0 0/0
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7014b70 (LWP 26677)]
dv_frame_offset (timestamp=-233, s=<value optimized out>, c=<value optimized out>,
flags=<value optimized out>) at libavformat/dv.c:374
374 int64_t max_offset = ((size-1) / sys->frame_size) * sys->frame_size;
(gdb) bt
#0 dv_frame_offset (timestamp=-233, s=<value optimized out>, c=<value optimized out>,
flags=<value optimized out>) at libavformat/dv.c:374
#1 dv_read_seek (timestamp=-233, s=<value optimized out>, c=<value optimized out>,
flags=<value optimized out>) at libavformat/dv.c:472
#2 0x081100f0 in av_seek_frame (s=0x8c3f580, stream_index=0, timestamp=-233, flags=1)
at libavformat/utils.c:1788
#3 0x08050c4f in decode_thread (arg=0xf7015020) at ffplay.c:2524
#4 0xf7e04391 in ?? () from /usr/lib/libSDL-1.2.so.0
#5 0xf7e506eb in ?? () from /usr/lib/libSDL-1.2.so.0
#6 0xf7de06e5 in start_thread () from /lib/libpthread.so.0
#7 0xf7de0600 in ?? () from /lib/libpthread.so.0
(gdb) disass $pc-31 $pc+32
Dump of assembler code from 0x8083240 to 0x808327f:
0x08083240 <dv_frame_offset+0>: mov 0x8(%ebx),%eax
0x08083243 <dv_frame_offset+3>: mov 0x8(%eax),%eax
0x08083246 <dv_frame_offset+6>: mov %eax,(%esp)
0x08083249 <dv_frame_offset+9>: call 0x81db3c0 <ff_dv_codec_profile>
0x0808324e <dv_frame_offset+14>: mov 0x60(%esp),%edx
0x08083252 <dv_frame_offset+18>: mov %eax,%ebp
0x08083254 <dv_frame_offset+20>: mov 0x10(%edx),%eax
0x08083257 <dv_frame_offset+23>: mov %eax,(%esp)
0x0808325a <dv_frame_offset+26>: call 0x807b270 <avio_size>
0x0808325f <dv_frame_offset+31>: mov 0x8(%ebp),%ebp
0x08083262 <dv_frame_offset+34>: mov %ebp,0x28(%esp)
0x08083266 <dv_frame_offset+38>: mov %edx,%edi
0x08083268 <dv_frame_offset+40>: mov 0x60(%esp),%edx
0x0808326c <dv_frame_offset+44>: mov %eax,%esi
0x0808326e <dv_frame_offset+46>: mov 0xf04(%edx),%eax
0x08083274 <dv_frame_offset+52>: mov 0xf08(%edx),%edx
0x0808327a <dv_frame_offset+58>: sub %eax,%esi
0x0808327c <dv_frame_offset+60>: mov %eax,0x30(%esp)
End of assembler dump.
(gdb) info registers
eax 0x9c4000 10240000
ecx 0xf7014060 -150912928
edx 0x0 0
ebx 0x8c68560 147228000
esp 0xf70140f0 0xf70140f0
ebp 0x0 0x0
esi 0x0 0
edi 0xffffff17 -233
eip 0x808325f 0x808325f <dv_frame_offset+31>
eflags 0x10282 [ SF IF RF ]
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x63 99
comment:3 by , 15 years ago
| Component: | undetermined → avformat |
|---|---|
| Version: | unspecified → git |
comment:4 by , 14 years ago
when I use ffmpeg with lowres then the output video have still the same resolution as input, so maybe this is the reasone why ffplay crashes after seeking?
374 int64_t max_offset = ((size-1) / sys->frame_size) * sys->frame_size;
C:\>ffmpeg -lowres 3 -i C:\small_test2.dv out.avi
ffmpeg version N-34031-ge403a97, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 25 2011 15:06:47 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --enable-runtime-cpudetect --ena
ble-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --ena
ble-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --en
able-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 22. 0 / 51. 22. 0
libavcodec 53. 23. 0 / 53. 23. 0
libavformat 53. 17. 0 / 53. 17. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 45. 0 / 2. 45. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
[dv @ 02092320] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'C:\small_test2.dv':
Duration: 00:00:02.84, start: 0.000000, bitrate: 28800 kb/s
Stream #0:0: Video: dvvideo, yuv420p, 720x576, 28800 kb/s, SAR 16:15 DAR 4:3
, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
Stream #0:2: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 kb/s
w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:16/15 sws_param:
[pcm_s16le @ 02606100] The maximum value for lowres supported by the decoder is
0
Output #0, avi, to 'out.avi':
Metadata:
ISFT : Lavf53.17.0
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576 [SAR 16:15 D
AR 4:3], q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 32000 Hz, 2 channels, s16, 12
8 kb/s
Stream mapping:
Stream #0.0 -> #0.0 (dvvideo -> mpeg4)
Stream #0.1 -> #0.1 (pcm_s16le -> libmp3lame)
Press [q] to stop, [?] for help
[buffer @ 020A2740] Buffer video input changed from size:720x576 fmt:yuv420p to
size:90x72 fmt:yuv420p
[buffer @ 020A2740] Inserting scaler filter
[buffersink @ 020A29C0] auto-inserting filter 'Input equalizer' between the filt
er 'src' and the filter 'out'
[scale @ 020A3E20] w:90 h:72 fmt:yuv420p -> w:720 h:576 fmt:yuv420p flags:0x2
frame= 28 fps= 0 q=8.7 size= 99kB time=00:00:01.04 bitrate= 775.6kbits/s
frame= 56 fps= 0 q=18.4 size= 165kB time=00:00:02.12 bitrate= 634.5kbits/
AC EOB marker is absent pos=71
frame= 72 fps= 56 q=20.7 Lsize= 206kB time=00:00:02.88 bitrate= 585.9kbits
/s
video:148kB audio:45kB global headers:0kB muxing overhead 6.936536%
comment:5 by , 14 years ago
| Cc: | added |
|---|---|
| Resolution: | → fixed |
| Status: | open → closed |
This should be fixed in current git with commit 7b2dba1c50c92c76f147727be7c27872252e29f6.
comment:7 by , 13 years ago
| Keywords: | dvvideo crash SIGSEGV lowres roundup added |
|---|



with the latest snapshot I can't reproduce the crash, but there is an invalid read (at least under amigaos), so it would be recommended to check what happens under valgrind.