[FFmpeg-devel] lavf/matroska*: DiscardPadding is a signed integer

Michael Niedermayer michaelni at gmx.at
Sat Nov 16 00:57:39 CET 2013


On Fri, Nov 15, 2013 at 07:55:08PM -0300, James Almer wrote:
> 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.

thanks for testing


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131116/ca523e47/attachment.asc>


More information about the ffmpeg-devel mailing list