Fix for visible OSD corruption
JW <[email protected]> Tue, 07 Jul 2020 10:50:00 +1000
| Newsgroups | gmane.comp.video.xine.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------070601020200060506090801
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
When C-i is used to view stream information via OSD then often
corruption appears after the "Audio:" prefix. Somewhat surprised that
nobody has seen this or ever bothered to fixed it, but it is caused by
the commandeering of caller's buffer to communicate with demuxer or
input, and the failure to restore the zapped null character.
That awful kludge merits another kludge to compensate.
A patch is attached.
:JW
--------------070601020200060506090801
Content-Type: text/plain;
name="xine-lang.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="xine-lang.patch"
#
# If the "lang" argument is going to be used as a kludge to
# supply get_optional_data() with additional information it
# needs then it should also be cleared/restored should the
# get_optional_info() fail.
#
--- xine-lib-1.2.10/src/xine-engine/xine.c.lang 2019-12-14 07:47:50.000000000 +1100
+++ xine-lib-1.2.10/src/xine-engine/xine.c 2020-07-07 10:38:06.000000000 +1000
@@ -3229,6 +3229,7 @@
if (stream->demux_plugin->get_optional_data (stream->demux_plugin, lang,
DEMUX_OPTIONAL_DATA_SPULANG) == DEMUX_OPTIONAL_SUCCESS)
return 1;
+ *lang = '\0';
}
}
@@ -3242,6 +3243,7 @@
if (stream->s.input_plugin->get_optional_data (stream->s.input_plugin, lang,
INPUT_OPTIONAL_DATA_SPULANG) == INPUT_OPTIONAL_SUCCESS)
return 1;
+ *lang = '\0';
}
}
@@ -3266,6 +3268,7 @@
if (stream->demux_plugin->get_optional_data (stream->demux_plugin, lang,
DEMUX_OPTIONAL_DATA_AUDIOLANG) == DEMUX_OPTIONAL_SUCCESS)
return 1;
+ *lang = '\0';
}
}
@@ -3276,6 +3279,7 @@
if (stream->s.input_plugin->get_optional_data (stream->s.input_plugin, lang,
INPUT_OPTIONAL_DATA_AUDIOLANG) == INPUT_OPTIONAL_SUCCESS)
return 1;
+ *lang = '\0';
}
}
--------------070601020200060506090801
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--------------070601020200060506090801
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
xine-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-devel
--------------070601020200060506090801--