Revision f3356e9c libavformat/nut.c

View differences:

libavformat/nut.c
1222 1222
static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code, int frame_type, int64_t frame_start){
1223 1223
    AVFormatContext *s= nut->avf;
1224 1224
    ByteIOContext *bc = &s->pb;
1225
    int size, stream_id, key_frame;
1226
    int64_t pts;
1225
    int size, stream_id, key_frame, discard;
1226
    int64_t pts, last_IP_pts;
1227 1227
    
1228 1228
    size= decode_frame_header(nut, &key_frame, &pts, &stream_id, frame_code, frame_type, frame_start);
1229 1229
    if(size < 0)
1230 1230
        return -1;
1231 1231

  
1232
    if(s->streams[ stream_id ]->discard){
1232
    discard= s->streams[ stream_id ]->discard;
1233
    last_IP_pts= s->streams[ stream_id ]->last_IP_pts;
1234
    if(  (discard >= AVDISCARD_NONKEY && !key_frame)
1235
       ||(discard >= AVDISCARD_BIDIR && last_IP_pts != AV_NOPTS_VALUE && last_IP_pts > pts)
1236
       || discard >= AVDISCARD_ALL){
1233 1237
        url_fskip(bc, size);
1234 1238
        return 1;
1235 1239
    }

Also available in: Unified diff