Revision b4aea108

View differences:

ffmpeg.c
2900 2900
            //fprintf(stderr, "\nInput Audio channels: %d", enc->channels);
2901 2901
            audio_channels = enc->channels;
2902 2902
            audio_sample_rate = enc->sample_rate;
2903
            if(audio_disable)
2904
                ic->streams[i]->discard= 1;
2903 2905
            break;
2904 2906
        case CODEC_TYPE_VIDEO:
2905 2907
            frame_height = enc->height;
......
2933 2935
            frame_rate_base = rfps_base;
2934 2936

  
2935 2937
            enc->rate_emu = rate_emu;
2938
            if(video_disable)
2939
                ic->streams[i]->discard= 1;
2936 2940
            break;
2937 2941
        case CODEC_TYPE_DATA:
2938 2942
            break;
libavformat/avformat.h
227 227
    int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */
228 228
    /* ffmpeg.c private use */
229 229
    int stream_copy; /* if TRUE, just copy stream */
230
    int discard; ///< if 1, packets can be discarded at will and dont need to be demuxed
231
    //FIXME move stuff to a flags field?
230 232
    /* quality, as it has been removed from AVCodecContext and put in AVVideoFrame
231 233
     * MN:dunno if thats the right place, for it */
232 234
    float quality; 
libavformat/avidec.c
449 449
          AVIStream *ast;
450 450
          st = s->streams[n];
451 451
          ast = st->priv_data;
452
          
453
          if(st->discard){
454
                url_fskip(pb, size);
455
                goto resync;
456
          }
452 457

  
453 458
          if(   ((ast->prefix_count<5 || sync+9 > i) && d[2]<128 && d[3]<128) || 
454 459
                d[2]*256+d[3] == ast->prefix /*||

Also available in: Unified diff