| 692 | } |
| 693 | |
| 694 | static int audio_inactive( hb_stream_t *stream, int id, int stream_id_ext ) |
| 695 | { |
| 696 | if ( id < 0 ) |
| 697 | { |
| 698 | // PID declared inactive by hb_stream_title_scan |
| 699 | return 1; |
| 700 | } |
| 701 | if ( id == stream->pmt_info.PCR_PID ) |
| 702 | { |
| 703 | // PCR PID is always active |
| 704 | return 0; |
| 705 | } |
| 706 | |
| 707 | int i; |
| 708 | for ( i = 0; i < hb_list_count( stream->title->list_audio ); ++i ) |
| 709 | { |
| 710 | hb_audio_t *audio = hb_list_item( stream->title->list_audio, i ); |
| 711 | if ( audio->id == ((stream_id_ext << 16) | id) ) |
| 712 | { |
| 713 | return 0; |
| 714 | } |
| 715 | } |
| 716 | return 1; |
| 717 | } |
| 718 | |
| 719 | /* when the file was first opened we made entries for all the audio elementary |
| 720 | * streams we found in it. Streams that were later found during the preview scan |
no test coverage detected