Diaoul/enzyme — pull request #2 by robmcmullen (2012-03-26 16:31:39+00:00)
Title: Fix for .avi files not including overall container length

The AVContainer._finalize method finds longest video/audio length and promotes it to the container length, but I couldn't find where this was being called. Other containers seem to set the length correctly, but RIFF doesn't.

Sample file here:

http://cinelerra.org/footage/bars_100.avi

Before:

```
/opt/download/bars_100.avi
| type: AVI
| mime: video/avi
| delay: 0.0
+-- Video Track #1
| | length: 4.04
| | codec: dvsd
| | width: 720
| | height: 576
| | fps: 25.0
+-- Audio Track #1
| | channels: 2
| | samplerate: 48000
| | codec: 1
```

After:

```
/opt/download/bars_100.avi
| type: AVI
| mime: video/avi
| length: 4.04
| delay: 0.0
+-- Video Track #1
| | length: 4.04
| | codec: DV
| | width: 720
| | height: 576
| | fps: 25.0
| | fourcc: DVSD
+-- Audio Track #1
| | channels: 2
| | samplerate: 48000
| | codec: PCM
| | fourcc: 0x1
```

It seems like the fourcc value is now set, which relates to a comment in riff.py about using finalize to resolved it from its dummy value.