Mercurial > libavcodec.hg
comparison dv.c @ 2453:f67b63ed036d libavcodec
avoid buf_size == 0 checks in every decoder
author | michael |
---|---|
date | Sun, 23 Jan 2005 18:09:06 +0000 |
parents | 18b8b2dcc037 |
children | 5e24800ab329 |
comparison
equal
deleted
inserted
replaced
2452:73a66a4a6ab4 | 2453:f67b63ed036d |
---|---|
886 void *data, int *data_size, | 886 void *data, int *data_size, |
887 uint8_t *buf, int buf_size) | 887 uint8_t *buf, int buf_size) |
888 { | 888 { |
889 DVVideoContext *s = avctx->priv_data; | 889 DVVideoContext *s = avctx->priv_data; |
890 | 890 |
891 /* special case for last picture */ | |
892 if(buf_size==0) | |
893 return 0; | |
894 | |
895 s->sys = dv_frame_profile(buf); | 891 s->sys = dv_frame_profile(buf); |
896 if (!s->sys || buf_size < s->sys->frame_size) | 892 if (!s->sys || buf_size < s->sys->frame_size) |
897 return -1; /* NOTE: we only accept several full frames */ | 893 return -1; /* NOTE: we only accept several full frames */ |
898 | 894 |
899 if(s->picture.data[0]) | 895 if(s->picture.data[0]) |