X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fffmpeg.C;h=47c603f2f72feedc8429243dd4c7dd06f9783ab0;hp=9569de77efcd11c0979e0c2f6d93c4adf1c2cb86;hb=8e67d840c5a93f77de021102a4f0bfc4e07504f4;hpb=b350aa5a1ccbadcb5f794183c443c0738cd1e9ab diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 9569de77..47c603f2 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -455,7 +455,7 @@ int FFStream::decode(AVFrame *frame) AVPacket *pkt = ret > 0 ? (AVPacket*)ipkt : 0; if( pkt ) { if( pkt->stream_index != st->index ) continue; - if( !pkt->data | !pkt->size ) continue; + if( !pkt->data || !pkt->size ) continue; } if( (ret=avcodec_send_packet(avctx, pkt)) < 0 ) { ff_err(ret, "FFStream::decode: avcodec_send_packet failed.\nfile:%s\n", @@ -835,7 +835,8 @@ int FFAudioStream::decode_frame(AVFrame *frame) frame->best_effort_timestamp = AV_NOPTS_VALUE; int ret = avcodec_receive_frame(avctx, frame); if( ret < 0 ) { - if( first_frame || ret == AVERROR(EAGAIN) ) return 0; + if( first_frame ) return 0; + if( ret == AVERROR(EAGAIN) ) return 0; if( ret == AVERROR_EOF ) { st_eof(1); return 0; } ff_err(ret, "FFAudioStream::decode_frame: Could not read audio frame.\nfile:%s\n", ffmpeg->fmt_ctx->url); @@ -1135,7 +1136,7 @@ int FFVideoStream::decode_frame(AVFrame *frame) int first_frame = seeked; seeked = 0; int ret = avcodec_receive_frame(avctx, frame); if( ret < 0 ) { - if( first_frame || ret == AVERROR(EAGAIN) ) return 0; + if( first_frame ) return 0; if( ret == AVERROR(EAGAIN) ) return 0; if( ret == AVERROR_EOF ) { st_eof(1); return 0; } ff_err(ret, "FFVideoStream::decode_frame: Could not read video frame.\nfile:%s\n,",