# HG changeset patch # User reimar # Date 1399753401 0 # Node ID 0bbd04a5f9204c2bb5fe3b5352184664e3e18d8b # Parent ab6b3fd992dc1c548f13e20d3fe59fdf7d46d783 mencoder: simplify audio copy case. diff -r ab6b3fd992dc -r 0bbd04a5f920 mencoder.c --- a/mencoder.c Sat May 10 20:23:20 2014 +0000 +++ b/mencoder.c Sat May 10 20:23:21 2014 +0000 @@ -1373,24 +1373,16 @@ } if (v_muxer_time == 0) mux_a->h.dwInitialFrames++; } - else { + else if (mux_a->codec == ACODEC_COPY) { if(mux_a->h.dwSampleSize){ int len; - switch(mux_a->codec){ - case ACODEC_COPY: // copy len=mux_a->wf->nAvgBytesPerSec*tottime; len/=mux_a->h.dwSampleSize;if(len<1) len=1; len*=mux_a->h.dwSampleSize; bytes_to_mux=demux_read_data(sh_audio->ds,mux_a->buffer,len); - break; - } } else { // VBR - encode/copy an audio frame - switch(mux_a->codec){ - case ACODEC_COPY: // copy bytes_to_mux=ds_get_packet(sh_audio->ds,(unsigned char**) &mux_a->buffer); - break; - } } } if(bytes_to_mux<=0) {