Revision 031e14ea ffmpeg.c

View differences:

ffmpeg.c
1185 1185
    int got_subtitle;
1186 1186
    AVPacket avpkt;
1187 1187

  
1188
    av_init_packet(&avpkt);
1189

  
1190 1188
    if(ist->next_pts == AV_NOPTS_VALUE)
1191 1189
        ist->next_pts= ist->pts;
1192 1190

  
1193 1191
    if (pkt == NULL) {
1194 1192
        /* EOF handling */
1193
        av_init_packet(&avpkt);
1195 1194
        avpkt.data = NULL;
1196 1195
        avpkt.size = 0;
1197 1196
        goto handle_eof;
1197
    } else {
1198
        avpkt = *pkt;
1198 1199
    }
1199 1200

  
1200 1201
    if(pkt->dts != AV_NOPTS_VALUE)
1201 1202
        ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
1202 1203

  
1203
    avpkt.size = pkt->size;
1204
    avpkt.data = pkt->data;
1205

  
1206 1204
    //while we have more to decode or while the decoder did output something on EOF
1207 1205
    while (avpkt.size > 0 || (!pkt && ist->next_pts != ist->pts)) {
1208 1206
    handle_eof:

Also available in: Unified diff