Commit 2c8cc24e authored by Jean-Paul Saman's avatar Jean-Paul Saman

examples/get_pcr_pid.c: Fail if attaching PMT decoder fails.

Squashed commit 53be8f into this one.
(cherry picked from commit 53be8f3b)
parent 3b2dcf44
......@@ -170,6 +170,8 @@ int main( int i_argc, char **pp_argv )
i_program = strtol( pp_argv[2], NULL, 0 );
p_pat_dvbpsi_fd = dvbpsi_AttachPAT( PATCallback, NULL );
if ( p_pat_dvbpsi_fd == NULL )
goto out;
p_buffer = malloc( TS_SIZE * READ_ONCE );
if ( p_buffer == NULL )
......@@ -200,6 +202,7 @@ int main( int i_argc, char **pp_argv )
free( p_buffer );
out:
if ( p_pat_dvbpsi_fd ) dvbpsi_DetachPAT( p_pat_dvbpsi_fd );
close( i_fd );
fprintf( stderr, "no PAT/PMT found\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