Revision 545465ec ffmpeg.c

View differences:

ffmpeg.c
1553 1553
    AVInputFile *file_table;
1554 1554
    int key;
1555 1555
    int want_sdp = 1;
1556
    uint8_t no_packet[MAX_FILES]={0};
1557
    int no_packet_count=0;
1556 1558

  
1557 1559
    file_table= av_mallocz(nb_input_files * sizeof(AVInputFile));
1558 1560
    if (!file_table)
......
2057 2059
            ost = ost_table[i];
2058 2060
            os = output_files[ost->file_index];
2059 2061
            ist = ist_table[ost->source_index];
2062
            if(no_packet[ist->file_index])
2063
                continue;
2060 2064
            if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO)
2061 2065
                opts = ost->sync_opts * av_q2d(ost->st->codec->time_base);
2062 2066
            else
......
2079 2083
        }
2080 2084
        /* if none, if is finished */
2081 2085
        if (file_index < 0) {
2086
            if(no_packet_count){
2087
                no_packet_count=0;
2088
                memset(no_packet, 0, sizeof(no_packet));
2089
                continue;
2090
            }
2082 2091
            break;
2083 2092
        }
2084 2093

  
......
2093 2102
        /* read a frame from it and output it in the fifo */
2094 2103
        is = input_files[file_index];
2095 2104
        ret= av_read_frame(is, &pkt);
2096
        if(ret == AVERROR(EAGAIN) && strcmp(is->iformat->name, "ffm"))
2105
        if(ret == AVERROR(EAGAIN) && strcmp(is->iformat->name, "ffm")){
2106
            no_packet[file_index]=1;
2107
            no_packet_count++;
2097 2108
            continue;
2109
        }
2098 2110
        if (ret < 0) {
2099 2111
            file_table[file_index].eof_reached = 1;
2100 2112
            if (opt_shortest)
......
2103 2115
                continue;
2104 2116
        }
2105 2117

  
2118
        no_packet_count=0;
2119
        memset(no_packet, 0, sizeof(no_packet));
2120

  
2106 2121
        if (do_pkt_dump) {
2107 2122
            av_pkt_dump_log(NULL, AV_LOG_DEBUG, &pkt, do_hex_dump);
2108 2123
        }

Also available in: Unified diff