[FFmpeg-devel] [PATCH]Set AVSubtitle format to 0
Björn Axelsson
gecko
Wed Feb 11 23:00:26 CET 2009
Neither dvdsubdec nor xsubdec intializes format to 0, but ffplay checks it
before displaying subtitles (ffplay.c:1437).
I haven't seen any actual problem, but both patches are trivial and should be correct.
--
Bj?rn Axelsson
-------------- next part --------------
Index: libavcodec/dvdsubdec.c
===================================================================
--- libavcodec/dvdsubdec.c.orig 2009-02-11 22:51:10.000000000 +0100
+++ libavcodec/dvdsubdec.c 2009-02-11 22:51:20.000000000 +0100
@@ -175,6 +175,7 @@
return -1;
sub_header->rects = NULL;
sub_header->num_rects = 0;
+ sub_header->format = 0;
sub_header->start_display_time = 0;
sub_header->end_display_time = 0;
-------------- next part --------------
Index: libavcodec/xsubdec.c
===================================================================
--- libavcodec/xsubdec.c.orig 2009-02-09 18:05:44.000000000 +0100
+++ libavcodec/xsubdec.c 2009-02-09 18:08:38.000000000 +0100
@@ -51,6 +51,8 @@
int w, h, x, y, rlelen, i;
GetBitContext gb;
+ sub->format = 0;
+
// check that at least header fits
if (buf_size < 27 + 7 * 2 + 4 * 3) {
av_log(avctx, AV_LOG_ERROR, "coded frame too small\n");
More information about the ffmpeg-devel
mailing list