[FFmpeg-devel] [PATCH] add RV10 fourcc to libavformat/riff.c

Michael Niedermayer michaelni
Mon May 14 01:50:58 CEST 2007


Hi

On Sun, May 13, 2007 at 03:43:00PM -0700, Corey Hickey wrote:
> Michael Niedermayer wrote:
> >> 1. Using ffmpeg to directly encode rv10 to an avi makes a file that
> >> mplayer plays fine (patched or unpatched, using either native or lavf
> >> demuxer); however, ffplay segfaults.
> > 
> > ff* segfault -> me wants gdb output _always_
> 
> I know, but I can't keep up with with you in two threads at once. :)
> 
> See attached file for a gdb log.
> 
> To reproduce.
> 1. The source file probably isn't relevant, but if you want the one I'm
> using, get:
> http://fatooh.org/files/tmp/a.mpg
> 
> 2. Patch ffmpeg with riff patch from this thread; make.
> 
> 3. Encode to rv10 in avi:
> $ ffmpeg -i a.mpg -an -vcodec rv10 rv10.avi
> 
> 4. If for some reason that doesn't crash, try the avi I made:
> http://fatooh.org/files/tmp/rv10.avi
> 
> >> It's your call.
> > 
> > more investigation should be done, rv10 in avi would be funny :)
> 
> :)
> 
> -Corey

> $ gdb ./ffplay_g 
[...]
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1090525504 (LWP 26729)]
> rv10_decode_init (avctx=0xb72830) at rv10.c:539
> 539         s->h263_long_vectors= ((uint8_t*)avctx->extradata)[3] & 1;
> (gdb) bt

avctx->extradata == NULL ?

problem is likely that the extradata is build in libavformat/rm.c
see line 259
instead of the encoder 

fixes needed (all trivial)
1. rv10 decoder should check that extradata is != NULL in the init code
2. rv10 encodet should set extradata
3. rm muxer should write extradata instead of a hardcoded 32bit value

patch welcome ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070514/343e9e06/attachment.pgp>



More information about the ffmpeg-devel mailing list