[libbluray-devel] [Git][videolan/libbluray][master] 4 commits: Validate TextST subpath pid
Petri Hintukainen
gitlab at videolan.org
Thu Jan 3 23:57:35 CET 2019
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
082fb15f by hpi1 at 2019-01-03T21:19:00Z
Validate TextST subpath pid
- - - - -
288b104f by hpi1 at 2019-01-03T21:19:53Z
Add missing interface
- - - - -
8aacf7b4 by hpi1 at 2019-01-03T22:21:53Z
Main title selection: fix comparing codecs, prefer HEVC
- - - - -
66972eac by hpi1 at 2019-01-03T22:56:25Z
Simplify, drop unneeded headers
- - - - -
4 changed files:
- src/libbluray/bdj/java/org/videolan/mmbd/Adapter.java
- src/libbluray/bdnav/mpls_parse.h
- src/libbluray/bdnav/navigation.c
- src/libbluray/bluray.c
Changes:
=====================================
src/libbluray/bdj/java/org/videolan/mmbd/Adapter.java
=====================================
@@ -46,7 +46,7 @@ import javax.tv.xlet.XletContext;
import javax.tv.xlet.XletStateChangeException;
import org.bluray.bdplus.StatusListener;
-public class Adapter implements BDJClassLoaderAdapter {
+public class Adapter extends LoaderAdapter implements BDJClassLoaderAdapter {
public Map getHideClasses() {
return null;
=====================================
src/libbluray/bdnav/mpls_parse.h
=====================================
@@ -21,17 +21,15 @@
#if !defined(_MPLS_PARSE_H_)
#define _MPLS_PARSE_H_
-#include "mpls_data.h"
-#include "uo_mask_table.h"
-
#include "util/attributes.h"
#include <stdint.h>
struct bd_disc;
+struct mpls_pl;
-BD_PRIVATE MPLS_PL* mpls_parse(const char *path) BD_ATTR_MALLOC;
-BD_PRIVATE MPLS_PL* mpls_get(struct bd_disc *disc, const char *file);
-BD_PRIVATE void mpls_free(MPLS_PL **pl);
+BD_PRIVATE struct mpls_pl *mpls_parse(const char *path);
+BD_PRIVATE struct mpls_pl *mpls_get(struct bd_disc *disc, const char *file);
+BD_PRIVATE void mpls_free(struct mpls_pl **pl);
#endif // _MPLS_PARSE_H_
=====================================
src/libbluray/bdnav/navigation.c
=====================================
@@ -239,11 +239,16 @@ _filter_repeats(MPLS_PL *pl, unsigned repeats)
static void _video_props(MPLS_STN *s, int *format, int *codec)
{
unsigned ii;
- *codec = 1;
+ *codec = 0;
*format = 0;
for (ii = 0; ii < s->num_video; ii++) {
if (s->video[ii].coding_type > 4) {
- *codec = 0;
+ if (*codec < 1) {
+ *codec = 1;
+ }
+ }
+ if (s->video[ii].coding_type == BD_STREAM_TYPE_VIDEO_HEVC) {
+ *codec = 2;
}
if (s->video[ii].format == BD_VIDEO_FORMAT_1080I || s->video[ii].format == BD_VIDEO_FORMAT_1080P) {
if (*format < 1) {
@@ -280,7 +285,7 @@ static int _cmp_video_props(const MPLS_PL *p1, const MPLS_PL *p2)
if (format1 != format2)
return format2 - format1;
- /* prefer H.264/VC1 over MPEG1/2 */
+ /* prefer H.265 over H.264/VC1 over MPEG1/2 */
return codec2 - codec1;
}
=====================================
src/libbluray/bluray.c
=====================================
@@ -2102,6 +2102,10 @@ static int _preload_textst_subpath(BLURAY *bd)
if (textst_subpath < 0) {
return 0;
}
+ if (textst_pid != 0x1800) {
+ BD_DEBUG(DBG_BLURAY | DBG_CRIT, "_preload_textst_subpath(): ignoring pid 0x%x\n", (unsigned)textst_pid);
+ return 0;
+ }
if ((unsigned)textst_subpath >= bd->title->sub_path_count) {
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "_preload_textst_subpath(): invalid subpath id\n");
@@ -2131,7 +2135,7 @@ static int _preload_textst_subpath(BLURAY *bd)
return 0;
}
- gc_decode_ts(bd->graphics_controller, 0x1800, bd->st_textst.buf, SPN(bd->st_textst.clip_size) / 32, -1);
+ gc_decode_ts(bd->graphics_controller, textst_pid, bd->st_textst.buf, SPN(bd->st_textst.clip_size) / 32, -1);
/* set fonts and encoding from clip info */
gc_add_font(bd->graphics_controller, NULL, -1); /* reset fonts */
View it on GitLab: https://code.videolan.org/videolan/libbluray/compare/98a7d60a9cc4f529dffb3dabaf99cbf4f114f35d...66972eac0ec58d8f395205ae4246cc071bb9f266
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/compare/98a7d60a9cc4f529dffb3dabaf99cbf4f114f35d...66972eac0ec58d8f395205ae4246cc071bb9f266
You're receiving this email because of your account on code.videolan.org.
More information about the libbluray-devel
mailing list