comparison truemotion1.c @ 2453:f67b63ed036d libavcodec

avoid buf_size == 0 checks in every decoder
author michael
date Sun, 23 Jan 2005 18:09:06 +0000
parents 81802fed5b8c
children ba8ecddf5598
comparison
equal deleted inserted replaced
2452:73a66a4a6ab4 2453:f67b63ed036d
871 TrueMotion1Context *s = (TrueMotion1Context *)avctx->priv_data; 871 TrueMotion1Context *s = (TrueMotion1Context *)avctx->priv_data;
872 872
873 s->buf = buf; 873 s->buf = buf;
874 s->size = buf_size; 874 s->size = buf_size;
875 875
876 /* no supplementary picture */
877 if (buf_size == 0)
878 return 0;
879
880 if (truemotion1_decode_header(s) == -1) 876 if (truemotion1_decode_header(s) == -1)
881 return -1; 877 return -1;
882 878
883 s->frame.reference = 1; 879 s->frame.reference = 1;
884 if (avctx->get_buffer(avctx, &s->frame) < 0) { 880 if (avctx->get_buffer(avctx, &s->frame) < 0) {