GNOME Bugzilla – Bug 727402
aiffmux: write padding byte at end of SSND chunk if needed
Last modified: 2015-01-23 15:16:42 UTC
Aligning the SSND chunk will let the aiff muxer properly write chunks (like the ID3 one) after it. AIFF chunks are supposed to be even aligned.
Created attachment 273357 [details] [review] aiffmux: write padding byte at end of SSND chunk if needed
Review of attachment 273357 [details] [review]: ::: gst/aiff/aiffmux.c @@ +141,3 @@ + /* AIFF chunks must be even aligned */ + cur_size = AIFF_HEADER_LEN - 8 + audio_data_size; + if (cur_size & 1 && ((cur_size + 1) < G_MAXUINT32)) { No need for all these brackets, but I would make the & clearer if ((cur_size & 1) && cur_size + 1 < G_MAXUINT32) @@ +414,3 @@ + GST_BUFFER_OFFSET (buffer) = AIFF_HEADER_LEN + aiffmux->length; + GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE; + gst_pad_push (aiffmux->srcpad, buffer); Check the return value and print debug output here
Matthieu, can you please update the patch?
Created attachment 295274 [details] [review] aiffmux: write padding byte at end of SSND chunk if needed Sorry for the delay. Patch updated.
The following fix has been pushed: 6716671 aiffmux: write padding byte at end of SSND chunk if needed
Created attachment 295279 [details] [review] aiffmux: write padding byte at end of SSND chunk if needed AIFF chunks are supposed to be even aligned. Aligning the SSND chunk will allow the aiff muxer to properly write chunks (like the ID3 one) at the end of the file.