diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-20 07:05:35 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-03-31 01:08:12 +0200 |
commit | 96138e8c8da4b9397e627c934a33c22988d1192b (patch) | |
tree | 35b47277b40e4ddc5e2075658ee402decba9d02e /libavformat | |
parent | 9bd4a9f4eec8c8843b54126253bb9d77af95bbb3 (diff) | |
download | ffmpeg-96138e8c8da4b9397e627c934a33c22988d1192b.tar.gz |
isom: only write the size if its non zero in mov_rewrite_dvd_sub_extradata()
Sample-Id: NeroRecodeSample.mp4
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/isom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c index 3f420e70ce..cade775d64 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -446,8 +446,10 @@ static int mov_rewrite_dvd_sub_extradata(AVStream *st) if (st->codec->extradata_size != 64) return 0; - snprintf(buf, sizeof(buf), "size: %dx%d\npalette: ", - st->codec->width, st->codec->height); + if (st->codec->width > 0 && st->codec->height > 0) + snprintf(buf, sizeof(buf), "size: %dx%d\n", + st->codec->width, st->codec->height); + av_strlcat(buf, "palette: ", sizeof(buf)); for (i = 0; i < 16; i++) { uint32_t yuv = AV_RB32(src + i * 4); |