diff options
author | Thierry Foucu <tfoucu@gmail.com> | 2010-07-21 07:46:02 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-07-21 07:46:02 +0000 |
commit | 591db22dffa3871774c00a410d3c1196ecb0f3f6 (patch) | |
tree | 120d55a7f42bcef72c9423c9a4fa9ca153ff8248 | |
parent | e9e456d850f967cf802a4e66fe59426be51faa37 (diff) | |
download | ffmpeg-streaming-591db22dffa3871774c00a410d3c1196ecb0f3f6.zip ffmpeg-streaming-591db22dffa3871774c00a410d3c1196ecb0f3f6.tar.gz |
gxfenc: Fix ES name in the UMF media description, by using strlen instead of sizeof
Patch by Thierry Foucu, tfoucu at gmail
Originally committed as revision 24379 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/gxfenc.c | 4 | ||||
-rw-r--r-- | tests/ref/lavf/gxf | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index a6f4b72..b20a842 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -550,9 +550,9 @@ static int gxf_write_umf_media_description(AVFormatContext *s) 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); diff --git a/tests/ref/lavf/gxf b/tests/ref/lavf/gxf index d147bc4..5dc3ea7 100644 --- a/tests/ref/lavf/gxf +++ b/tests/ref/lavf/gxf @@ -1,3 +1,3 @@ -b52bf18b403ac9a0d12048b2f66cb24c *./tests/data/lavf/lavf.gxf +5b9c8da067585aeb04e5fb31e021cbfd *./tests/data/lavf/lavf.gxf 796392 ./tests/data/lavf/lavf.gxf ./tests/data/lavf/lavf.gxf CRC=0xad9e86eb |