[FFmpeg-cvslog] avformat/isom: only write the size if its non zero in mov_rewrite_dvd_sub_extradata()
Michael Niedermayer
git at videolan.org
Mon Mar 17 18:45:55 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Mar 17 17:08:39 2014 +0100| [b6ad5893ce585ac6d0a5a4750cba6bb700dbc902] | committer: Michael Niedermayer
avformat/isom: only write the size if its non zero in mov_rewrite_dvd_sub_extradata()
Fixes regression with NeroRecodeSample.mp4
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6ad5893ce585ac6d0a5a4750cba6bb700dbc902
---
libavformat/isom.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/isom.c b/libavformat/isom.c
index d897808..a38d397 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -464,8 +464,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);
More information about the ffmpeg-cvslog
mailing list