<html><head></head><body>This has nothing to do with the correct value range inside MP4. It's a matter of integer promotion rules in C.<br><br><div class="gmail_quote">Le 5 mai 2020 10:45:18 GMT+03:00, Alexandre Janniaux <ajanni@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi,<br><br>I'm not sure of the format allowed for MP4 box paths but<br>since care was taken to have a fixed size format descriptor<br>to serialize the name I preferred keeping it.<br><br>François can probably assert whether %u would be correct or<br>not too.<br><br>Regards,<br>--<br>Alexandre Janniaux<br>Videolabs<br><br>On Mon, May 04, 2020 at 09:36:14PM +0300, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le maanantaina 4. toukokuuta 2020, 20.39.02 EEST Alexandre Janniaux a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><hr> modules/demux/mp4/attachments.c | 4 ++--<br> 1 file changed, 2 insertions(+), 2 deletions(-)<br><br> diff --git a/modules/demux/mp4/attachments.c<br> b/modules/demux/mp4/attachments.c index 59db7bb22bf..8376dbad053 100644<br> --- a/modules/demux/mp4/attachments.c<br> +++ b/modules/demux/mp4/attachments.c<br> @@ -315,10 +315,10 @@ int MP4_GetAttachments( const MP4_Box_t *p_root,<br> input_attachment_t ***ppp_attac if ( asprintf( &psz_location, "pnot[%u]",<br> i_index - 1 ) > -1 ) {<br> char rgz_path[14];<br> + uint16_t index = p_pnot->data.p_pnot->i_index - 1;<br> snprintf( rgz_path, 14,<br> "/%4.4s[%"PRIu16"]",<br> - (const char *) &p_pnot->data.p_pnot->i_type,<br> - p_pnot->data.p_pnot->i_index - 1 );<br> + (const char *) &p_pnot->data.p_pnot->i_type, index<br> ); const MP4_Box_t *p_pict = MP4_BoxGet( p_root, rgz_path ); if( p_pict )<br> {<br></blockquote> But why? You could just use %u directly here.<br><br> --<br> Реми Дёни-Курмон<br> <a href="http://www.remlab.net/">http://www.remlab.net/</a><hr> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>