[FFmpeg-devel] [PATCH]: fix ES name in the UMF media description
Thierry Foucu
tfoucu
Wed Jul 14 19:48:31 CEST 2010
On Wed, Jul 14, 2010 at 10:47 AM, Thierry Foucu <tfoucu at gmail.com> wrote:
> Hi,
> $subject
>
> replace sizeof by strlen
>
> Index: libavformat/gxfenc.c
> ===================================================================
> --- libavformat/gxfenc.c (revision 24229)
> +++ libavformat/gxfenc.c (working copy)
> @@ -550,9 +550,9 @@
> put_le32(pb, 0); /* attributes rw, ro */
> put_le32(pb, 0); /* mark in */
> put_le32(pb, gxf->nb_fields); /* mark out */
> - put_buffer(pb, ES_NAME_PATTERN, sizeof(ES_NAME_PATTERN));
> + put_buffer(pb, ES_NAME_PATTERN, strlen(ES_NAME_PATTERN));
> put_be16(pb, sc->media_info);
> - for (j = sizeof(ES_NAME_PATTERN)+2; j < 88; j++)
> + for (j = strlen(ES_NAME_PATTERN)+2; j < 88; j++)
> put_byte(pb, 0);
> put_le32(pb, sc->track_type);
> put_le32(pb, sc->sample_rate);
>
>
forgot the patch file.
-------------- next part --------------
Index: libavformat/gxfenc.c
===================================================================
--- libavformat/gxfenc.c (revision 24229)
+++ libavformat/gxfenc.c (working copy)
@@ -550,9 +550,9 @@
put_le32(pb, 0); /* attributes rw, ro */
put_le32(pb, 0); /* mark in */
put_le32(pb, gxf->nb_fields); /* mark out */
- put_buffer(pb, ES_NAME_PATTERN, sizeof(ES_NAME_PATTERN));
+ put_buffer(pb, ES_NAME_PATTERN, strlen(ES_NAME_PATTERN));
put_be16(pb, sc->media_info);
- for (j = sizeof(ES_NAME_PATTERN)+2; j < 88; j++)
+ for (j = strlen(ES_NAME_PATTERN)+2; j < 88; j++)
put_byte(pb, 0);
put_le32(pb, sc->track_type);
put_le32(pb, sc->sample_rate);
More information about the ffmpeg-devel
mailing list