[SCM] libav/experimental: isom: only write the size if its non zero in mov_rewrite_dvd_sub_extradata()
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Aug 10 16:02:31 UTC 2014
The following commit has been merged in the experimental branch:
commit 96138e8c8da4b9397e627c934a33c22988d1192b
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Thu Mar 20 07:05:35 2014 +0000
isom: only write the size if its non zero in mov_rewrite_dvd_sub_extradata()
Sample-Id: NeroRecodeSample.mp4
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 3f420e7..cade775 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);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list