summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2020-08-20 11:41:33 -0600
committerJohn Stebbins <[email protected]>2020-08-20 11:41:33 -0600
commit6ff96bb1554f623e1ae8f7036c61cf682038c936 (patch)
treeeb21121308b940ce25ab84f1025bb94961765d30
parent2b25efd2b76ecfede735cc10eff971aaf122f855 (diff)
dvdnav: set HB_ERROR_READ when exiting early due to errors
-rw-r--r--libhb/dvdnav.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c
index 970ee29c5..c331ac271 100644
--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -1749,6 +1749,11 @@ static hb_buffer_t * hb_dvdnav_read( hb_dvd_t * e )
// Transition to another title signals that we are done.
hb_buffer_close( &b );
hb_deep_log(2, "dvdnav: vts change, found next title");
+ if (error_count > 0)
+ {
+ // Last read attempt failed
+ hb_set_work_error(d->h, HB_ERROR_READ);
+ }
return NULL;
}
}
@@ -1773,6 +1778,11 @@ static hb_buffer_t * hb_dvdnav_read( hb_dvd_t * e )
// Transition to another title signals that we are done.
hb_buffer_close( &b );
hb_deep_log(2, "dvdnav: cell change, found next title");
+ if (error_count > 0)
+ {
+ // Last read attempt failed
+ hb_set_work_error(d->h, HB_ERROR_READ);
+ }
return NULL;
}
c = FindChapterIndex(d->list_dvd_chapter, pgcn, pgn);
@@ -1784,6 +1794,11 @@ static hb_buffer_t * hb_dvdnav_read( hb_dvd_t * e )
// a transition to an earlier chapter means we're done.
hb_buffer_close( &b );
hb_deep_log(2, "dvdnav: cell change, previous chapter");
+ if (error_count > 0)
+ {
+ // Last read attempt failed
+ hb_set_work_error(d->h, HB_ERROR_READ);
+ }
return NULL;
}
chapter = d->chapter = c;
@@ -1792,6 +1807,11 @@ static hb_buffer_t * hb_dvdnav_read( hb_dvd_t * e )
{
hb_buffer_close( &b );
hb_deep_log(2, "dvdnav: cell change, previous cell");
+ if (error_count > 0)
+ {
+ // Last read attempt failed
+ hb_set_work_error(d->h, HB_ERROR_READ);
+ }
return NULL;
}
d->cell = cell_event->cellN;
@@ -1830,6 +1850,11 @@ static hb_buffer_t * hb_dvdnav_read( hb_dvd_t * e )
d->stopped = 1;
hb_buffer_close( &b );
hb_deep_log(2, "dvdnav: stop");
+ if (error_count > 0)
+ {
+ // Last read attempt failed
+ hb_set_work_error(d->h, HB_ERROR_READ);
+ }
return NULL;
default: