[FFmpeg-devel] lavf/matroska*: DiscardPadding is a signed integer
James Almer
jamrial at gmail.com
Fri Nov 15 23:55:08 CET 2013
On 15/11/13 5:51 PM, Michael Niedermayer wrote:
> On Thu, Nov 14, 2013 at 12:58:28PM +0100, Jan Gerber wrote:
>>
>> according to the Matriska Specification
>> http://matroska.org/technical/specs/index.html
>> DiscardPadding is a signed integer.
>
> has this been tested against other (de)muxers ?
> its the first code that uses sint_* so having it double checked makes
> sense, to ensure we dont generate invalid files
Without this patch:
ffmpeg -i tests/data/asynth-44100-2.wav -c:a libopus -b:a 256k uint.mka
[...]
mkvinfo -v uint.mka
| + Block group
| + Block (track number 1, 1 frame(s), timecode 6.001s = 00:00:06.001)
| + Frame with size 537
| + Discard padding: 3.500ms (3500000ns)
ffmpeg -i tests/data/asynth-44100-2.wav -c:a libopus -b:a 256k -frame_duration 20 uint_20.mka
[...]
mkvinfo -v uint_20.mka
| + Block group
| + Block (track number 1, 1 frame(s), timecode 6.001s = 00:00:06.001)
| + Frame with size 804
| + Discard padding: -3.277ms (-3277216ns)
---
With this patch:
ffmpeg -i tests/data/asynth-44100-2.wav -c:a libopus -b:a 256k int.mka
[...]
mkvinfo -v int.mka
| + Block group
| + Block (track number 1, 1 frame(s), timecode 6.001s = 00:00:06.001)
| + Frame with size 537
| + Discard padding: 3.500ms (3500000ns)
ffmpeg -i tests/data/asynth-44100-2.wav -c:a libopus -b:a 256k -frame_duration 20 int_20.mka
[...]
mkvinfo -v int_20.mka
| + Block group
| + Block (track number 1, 1 frame(s), timecode 6.001s = 00:00:06.001)
| + Frame with size 804
| + Discard padding: 13.500ms (13500000ns)
---
When using mkvtoolnix to mux, DiscardPadding has the same values as ffmpeg with this patch
applied (3.5ms for frame_duration 10 and 13.5ms for frame_duration 20), so this patch is
fixing a bug in our muxer.
Regards.
More information about the ffmpeg-devel
mailing list