Commit 5957c2be authored by hpi1's avatar hpi1

Added BD_EVENT_ENCRYPTED.

Make bd_read() fail if aligned unit copy permission indicator is set.
parent 947a858d
......@@ -302,6 +302,14 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
}
/* Check TP_extra_header Copy_permission_indicator. If != 0, unit is still encrypted. */
if (buf[0] & 0xc0) {
DEBUG(DBG_BLURAY | DBG_CRIT,
"TP header copy permission indicator != 0, unit is still encrypted? (%p)\n", bd);
_queue_event(bd, (BD_EVENT){BD_EVENT_ENCRYPTED, 0});
return 0;
}
DEBUG(DBG_STREAM, "Read unit OK! (%p)\n", bd);
return 1;
......
......@@ -442,6 +442,7 @@ void bd_stop_bdj(BLURAY *bd); // shutdown BD-J and clean up resources
typedef enum {
BD_EVENT_NONE = 0,
BD_EVENT_ERROR,
BD_EVENT_ENCRYPTED,
/* current playback position */
BD_EVENT_ANGLE, /* current angle, 1...N */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment