After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 407433 - possibly obsolete code in avidemux
possibly obsolete code in avidemux
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-13 11:41 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2009-10-07 20:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Sauer (gstreamer, gtkdoc dev) 2007-02-13 11:41:30 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.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2007-02-13 11:55:47 UTC
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
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2007-02-13 12:34:27 UTC
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
Comment 3 Benjamin Otte (Company) 2007-02-13 13:14:08 UTC
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.
Comment 4 Ronald Bultje 2007-02-13 15:02:08 UTC
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.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2007-09-03 10:38:55 UTC
What if the audio is mp3. Shouldn't the slicing only be done for PCM/alaw/ulaw (where we know the unit-size).
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2009-10-07 20:49:59 UTC
This does not apply anymore.