From: Michael Niedermayer <michae...@gmx.at> Fixes regression with NeroRecodeSample.mp4
Signed-off-by: Michael Niedermayer <michae...@gmx.at> --- libavformat/isom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 1.9.0 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel