GNOME Bugzilla – Bug 407433
possibly obsolete code in avidemux
Last modified: 2009-10-07 20:49:59 UTC
gst_avi_demux_massage_index() contains this code from #define MAX_DURATION (GST_SECOND / 2) on that splits a avi-index entry into chunk if there is only one big chunk. I have the feeling that this is not used and I also can't imagine that it will work for anything but raw audio data. Decoders are usualy a bit picky and also imagesink want whole frames.
run this against as many avis you have. #!/bin/sh # # run as # ./aviindexsplit.sh for file in `find ./ -name "*.avi" -printf "%s %p\n" | sort -n | cut -d' ' -f2`; do res=`GST_DEBUG_NO_COLOR=1 GST_DEBUG="avidemux:5" python 2>&1 typefindtest.py $file | grep -oe "added [0-9]* new index entries" | cut -c16-` if [ -n "$res" ]; then echo "$res for $file" fi done
erm, without the 'cut' #!/bin/sh # # run as # ./aviindexsplit.sh for file in `find ./ -name "*.avi" -printf "%s %p\n" | sort -n | cut -d' ' -f2`; do res=`GST_DEBUG_NO_COLOR=1 GST_DEBUG="avidemux:5" python 2>&1 typefindtest.py $file | grep -oe "added [0-9]* new index entries" if [ -n "$res" ]; then echo "$res for $file" fi done
Remember me on IRC to run this against the avi I have that reliably managed to deadlock 0.8 totem with one queue full (audio queue) and the other one empty.
Stefan, do not touch code that you don't understand unless you asked the person that wrote it. Email the author or see the ChangeLog entry of the commit if you're not sure. This code is used by those AVI files that have a single audio chunk (I'm not sure if the code used an if (audio), but it quite definitely uses a if (num_frames == 1) for index expansion). This is valid and such files exist. The code above allows seeking in those files, and in some cases makes audio not hang the video thread (thus blocking the whole pipeline on input - this would happen to 0.10 as well). AVI files are available in bugzilla (see ChangeLog of said commit) or in mplayerhq.hu. I've already explained on the mailinglist how to reduce memory usage by ~98,5% using decent methods, try that and leave this code alone, please.
What if the audio is mp3. Shouldn't the slicing only be done for PCM/alaw/ulaw (where we know the unit-size).
This does not apply anymore.