Skip to content

Commit

Permalink
[xbmc][dvdnav] skip cell when unrecoverable
Browse files Browse the repository at this point in the history
  • Loading branch information
Voyager1 committed Feb 14, 2016
1 parent d265f78 commit fe6af9c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dvdnav.c
Expand Up @@ -564,6 +564,10 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, uint8_t **buf,
/* Decode nav into pci and dsi. Then get next VOBU info. */
if(!dvdnav_decode_packet(*buf, &this->dsi, &this->pci)) {
printerr("Expected NAV packet but none found.");
#ifdef _XBMC
/* skip this cell as we won't recover from this*/
vm_get_next_cell(this->vm);
#endif
pthread_mutex_unlock(&this->vm_lock);
return DVDNAV_STATUS_ERR;
}
Expand Down Expand Up @@ -860,6 +864,10 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, uint8_t **buf,
/* Decode nav into pci and dsi. Then get next VOBU info. */
if(!dvdnav_decode_packet(*buf, &this->dsi, &this->pci)) {
printerr("Expected NAV packet but none found.");
#ifdef _XBMC
/* skip this cell as we won't recover from this*/
vm_get_next_cell(this->vm);
#endif
pthread_mutex_unlock(&this->vm_lock);
return DVDNAV_STATUS_ERR;
}
Expand Down

0 comments on commit fe6af9c

Please sign in to comment.