Revision 40b0872a libavformat/mpegts.c

View differences:

libavformat/mpegts.c
622 622
               stream_type, pid);
623 623

  
624 624
        /* now create ffmpeg stream */
625
            if(ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES){
626
                pes= ts->pids[pid]->u.pes_filter.opaque;
627
                st= pes->st;
628
            }else{
629
                if (ts->pids[pid]) mpegts_close_filter(ts, ts->pids[pid]); //wrongly added sdt filter probably
630
                pes = add_pes_stream(ts, pid, pcr_pid, stream_type);
631
                if (pes)
632
                    st = new_pes_av_stream(pes, 0);
633
            }
634
            add_pid_to_pmt(ts, h->id, pid);
635
            if(st)
636
                av_program_add_stream_index(ts->stream, h->id, st->index);
625
        if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES) {
626
            pes= ts->pids[pid]->u.pes_filter.opaque;
627
            st= pes->st;
628
        } else {
629
            if (ts->pids[pid]) mpegts_close_filter(ts, ts->pids[pid]); //wrongly added sdt filter probably
630
            pes = add_pes_stream(ts, pid, pcr_pid, stream_type);
631
            if (pes)
632
                st = new_pes_av_stream(pes, 0);
633
        }
634

  
635
        add_pid_to_pmt(ts, h->id, pid);
637 636

  
638
        if (st) {
639
            if (language[0] != 0) {
637
        if(st) {
638
            av_program_add_stream_index(ts->stream, h->id, st->index);
639

  
640
            if (language[0] != 0)
640 641
                av_metadata_set(&st->metadata, "language", language);
641
            }
642 642

  
643
            if (stream_type == STREAM_TYPE_SUBTITLE_DVB) {
643
            if (stream_type == STREAM_TYPE_SUBTITLE_DVB)
644 644
                st->codec->sub_id = (anc_page << 16) | comp_page;
645
            }
646 645
        }
647 646
    }
648 647
    /* all parameters are there */

Also available in: Unified diff