[PATCH] semi-fixing mencoder lavc on big endian
Hi, here's a patch that let mencoder -ovc lavc work on big-endian machines. There's a FIXME in it : updating the header at the end of the recoding breaks the file. I just don't update it, causing the file length to be 0. It means that the resulting video is not seekable, and does not play with WMP. However it plays ok with mplayer (ppc or x86). Better than nothing I guess. Regards, -- Colin panic("Reboot failed -- System halted\n"); 2.2.19 linux/arch/arm/kernel/process.c
On Mon, 22 Jul 2002 11:49:16 +0200 Colin Leroy <colin@colino.net> wrote:
here's a patch that let mencoder -ovc lavc work on big-endian machines. There's a FIXME in it : updating the header at the end of the recoding breaks the file. I just don't update it, causing the file length to be 0.
Ping ;-) Any comments on this ? Thanks, -- \|/ ____ \|/ Colin "@'/ ,. \`@" http://www.geekounet.org/ /_| \__/ |_\ \__U_/
Hi Colin Leroy, on Mon, 22 Jul 2002 20:50:46 +0200 you wrote:
On Mon, 22 Jul 2002 11:49:16 +0200 Colin Leroy <colin@colino.net> wrote:
here's a patch that let mencoder -ovc lavc work on big-endian machines. There's a FIXME in it : updating the header at the end of the recoding breaks the file. I just don't update it, causing the file length to be 0.
Ping ;-) Any comments on this ?
Just looking quickly your patch i have a fews. First you must remove the few cosmetics. Also I don't think that you need to put all le2me in #ifdef WORDS_BIGENDIAN blocks as these macro wont do anything on lowendian machines. Albeu
On Fri, 26 Jul 2002 04:45:08 +0200 Alban Bedel <albeu@free.fr> wrote: Bonjour Alban :)
Just looking quickly your patch i have a fews. First you must remove the few cosmetics. Also I don't think that you need to put all le2me in #ifdef WORDS_BIGENDIAN blocks as these macro wont do anything on lowendian machines.
Thanks for your feedback, I must be dumb not to have thought le2me doesn't do anything on le machines :) Here's a cleaner patch. Thanks, -- Colin Random BOFH excuse: Yeah, yo mama dresses you funny and you need a mouse to delete files.
Hi,
// write index chunk: - write_avi_chunk(f,ckidAVINEWINDEX,16*muxer->idx_pos,muxer->idx); +{ + int pos=16*muxer->idx_pos; + le2me_AVIINDEXENTRY(muxer->idx); + write_avi_chunk(f,ckidAVINEWINDEX,pos,muxer->idx); /* AVIINDEXENTRY */ + le2me_AVIINDEXENTRY(muxer->idx); +}
this is bad... 16*muxer->idx_pos is not a 'pos', but the size of the whole index chunk, so 16*number_of_index_entries. so, le2me_AVIINDEXENTRY() shoudl be done for every index entries (in a loop), not only for the first one. A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
On Tue, 30 Jul 2002 20:29:27 +0200 Arpi <arpi@thot.banki.hu> wrote: Hi Arpi,
- write_avi_chunk(f,ckidAVINEWINDEX,16*muxer->idx_pos,muxer->idx); +{ + int pos=16*muxer->idx_pos; + le2me_AVIINDEXENTRY(muxer->idx); + write_avi_chunk(f,ckidAVINEWINDEX,pos,muxer->idx); /* AVIINDEXENTRY */ + le2me_AVIINDEXENTRY(muxer->idx); +}
this is bad... 16*muxer->idx_pos is not a 'pos', but the size of the whole index chunk, so 16*number_of_index_entries.
Ok, sorry for this;
so, le2me_AVIINDEXENTRY() shoudl be done for every index entries (in a loop), not only for the first one.
I don't find anything to do it nicely, do you have an idea for me ? Thanks, -- Colin http://www.colino.net/
On Tue, 30 Jul 2002 20:29:27 +0200 Arpi <arpi@thot.banki.hu> wrote: Hi,
this is bad... 16*muxer->idx_pos is not a 'pos', but the size of the whole index chunk, so 16*number_of_index_entries. so, le2me_AVIINDEXENTRY() shoudl be done for every index entries (in a loop), not only for the first one.
Is this better ? Regards, -- Colin http://dudusdl.sf.net/ : a free Puzzle Bubble clone
Hi,
16*muxer->idx_pos is not a 'pos', but the size of the whole index chunk, so 16*number_of_index_entries. so, le2me_AVIINDEXENTRY() shoudl be done for every index entries (in a loop), not only for the first one.
Is this better ?
yes, thanks, applied A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
participants (3)
-
Alban Bedel -
Arpi -
Colin Leroy