Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#251 closed defect (fixed)

rawvideo segfaults with -vcodec copy

Reported by: Leo Izen Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: crash rawvideo
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Hello, here is my full uncut output from ffmpeg:

[Leo@chessman ~]$ ffmpeg
ffmpeg version git-N-30183-g040e1c6, Copyright (c) 2000-2011 the FFmpeg developers
  built on May 24 2011 18:40:01 with gcc 4.5.1 20100924 (Red Hat 4.5.1-4)
  configuration: --enable-static --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-x11grab --enable-runtime-cpudetect --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencv --enable-libdc1394 --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib --arch=x86_64 --cpu=i7 --enable-pic --enable-sram --extra-libs=-lx264 --extra-cflags='-O3 -w' --extra-ldflags=-L/usr/local/lib --enable-libvo-amrwbenc --enable-libvo-aacenc
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  6. 0 / 53.  6. 0
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2. 10. 0 /  2. 10. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
[Leo@chessman ~]$

When running this command:
ffmpeg -f rawvideo -s qvga -r 29.97 -i /dev/zero -vcodec copy -f yuv4mpegpipe test.y4m
FFmpeg segfaults just before encoding. However, with this command, it does not:
ffmpeg -f rawvideo -s qvga -r 29.97 -i /dev/zero -vcodec rawvideo -f yuv4mpegpipe test.y4m
This also happens on other ffmpeg -i's that have rawvideo in the yuv pixel format, not just this one.

Change History (7)

comment:1 by Leo Izen, 13 years ago

Version might be git-master. I checked it out with git clone git://git.videolan.org/ffmpeg.git

comment:2 by Carl Eugen Hoyos, 13 years ago

Status: newopen
Version: gitgit-master

Please provide the complete, uncut output for the command that is failing and add a backtrace as explained on http://ffmpeg.org/bugreports.html

comment:3 by Leo Izen, 13 years ago

The output for the program is inside the GDB dump: http://pastebin.com/X0nU4BqU
So is the backtrace and other stuff.

comment:4 by Carl Eugen Hoyos, 13 years ago

If there is a crash reproducible with current git head, please post command line, output and backtrace (I suspect you have to use disass $pc-32, $pc+32) here on the bug tracker.

$ ffmpeg -f rawvideo -s qvga -r 29.97 -i /dev/zero -vcodec copy -f yuv4mpegpipe -y test.y4m
ffmpeg version git-N-30395-gb8a43bc, Copyright (c) 2000-2011 the FFmpeg developers
  built on May 29 2011 19:50:37 with gcc 4.5.3
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32' --enable-gpl
  libavutil    51.  3. 0 / 51.  3. 0
  libavcodec   53.  6. 1 / 53.  6. 1
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  1. 0 / 53.  1. 0
  libavfilter   2. 11. 0 /  2. 11. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[rawvideo @ 0x8caa320] Could not find codec parameters (Video: rawvideo, 320x240)
[rawvideo @ 0x8caa320] Estimating duration from bitrate, this may be inaccurate
/dev/zero: could not find codec parameters

comment:5 by Leo Izen, 13 years ago

I did. It's all inside the pastebin GDB dump.

comment:6 by Stefano Sabatini, 13 years ago

Analyzed by developer: set
Component: undeterminedFFmpeg
Reproduced by developer: set
Resolution: fixed
Status: openclosed

Should be fixed in:

commit ac41f3b036246e64d1724d945bea01d982bd1c91
Author: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date:   Mon May 30 16:52:35 2011 +0200

    ffmpeg: handle copy of packets for AVFMT_RAWPICTURE output formats
    
    Store AVPicture in AVPacket as required by AVFMT_RAWPICTURE formats.
    
    Fix trac issue #251.

comment:7 by Carl Eugen Hoyos, 11 years ago

Keywords: crash added; copy segmentation fault removed
Note: See TracTickets for help on using tickets.