| 645 | } |
| 646 | |
| 647 | static void hb_stream_delete_dynamic( hb_stream_t *d ) |
| 648 | { |
| 649 | if( d->file_handle ) |
| 650 | { |
| 651 | fclose( d->file_handle ); |
| 652 | d->file_handle = NULL; |
| 653 | } |
| 654 | |
| 655 | int i=0; |
| 656 | |
| 657 | if ( d->ts.packet ) |
| 658 | { |
| 659 | free( d->ts.packet ); |
| 660 | d->ts.packet = NULL; |
| 661 | } |
| 662 | if ( d->ts.list ) |
| 663 | { |
| 664 | for (i = 0; i < d->ts.count; i++) |
| 665 | { |
| 666 | if (d->ts.list[i].buf) |
| 667 | { |
| 668 | hb_buffer_close(&(d->ts.list[i].buf)); |
| 669 | d->ts.list[i].buf = NULL; |
| 670 | } |
| 671 | } |
| 672 | } |
| 673 | if ( d->pes.list ) |
| 674 | { |
| 675 | for (i = 0; i < d->pes.count; i++) |
| 676 | { |
| 677 | if (d->pes.list[i].extradata) |
| 678 | { |
| 679 | free(d->pes.list[i].extradata); |
| 680 | } |
| 681 | } |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | static void hb_stream_delete( hb_stream_t *d ) |
| 686 | { |
no test coverage detected