You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/vp6: Forward error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -298,6 +298,7 @@ static int vp6_parse_coeff_models(VP56Context *s)
|
|||||||
int node, cg, ctx, pos;
|
int node, cg, ctx, pos;
|
||||||
int ct; /* code type */
|
int ct; /* code type */
|
||||||
int pt; /* plane type (0 for Y, 1 for U or V) */
|
int pt; /* plane type (0 for Y, 1 for U or V) */
|
||||||
|
int ret;
|
||||||
|
|
||||||
memset(def_prob, 0x80, sizeof(def_prob));
|
memset(def_prob, 0x80, sizeof(def_prob));
|
||||||
|
|
||||||
@ -335,21 +336,25 @@ static int vp6_parse_coeff_models(VP56Context *s)
|
|||||||
|
|
||||||
if (s->use_huffman) {
|
if (s->use_huffman) {
|
||||||
for (pt=0; pt<2; pt++) {
|
for (pt=0; pt<2; pt++) {
|
||||||
if (vp6_build_huff_tree(s, model->coeff_dccv[pt],
|
ret = vp6_build_huff_tree(s, model->coeff_dccv[pt],
|
||||||
vp6_huff_coeff_map, 12, AC_DC_HUFF_BITS,
|
vp6_huff_coeff_map, 12, AC_DC_HUFF_BITS,
|
||||||
&s->dccv_vlc[pt]))
|
&s->dccv_vlc[pt]);
|
||||||
return -1;
|
if (ret < 0)
|
||||||
if (vp6_build_huff_tree(s, model->coeff_runv[pt],
|
return ret;
|
||||||
vp6_huff_run_map, 9, RUN_HUFF_BITS,
|
ret = vp6_build_huff_tree(s, model->coeff_runv[pt],
|
||||||
&s->runv_vlc[pt]))
|
vp6_huff_run_map, 9, RUN_HUFF_BITS,
|
||||||
return -1;
|
&s->runv_vlc[pt]);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
for (ct=0; ct<3; ct++)
|
for (ct=0; ct<3; ct++)
|
||||||
for (int cg = 0; cg < 4; cg++)
|
for (int cg = 0; cg < 4; cg++) {
|
||||||
if (vp6_build_huff_tree(s, model->coeff_ract[pt][ct][cg],
|
ret = vp6_build_huff_tree(s, model->coeff_ract[pt][ct][cg],
|
||||||
vp6_huff_coeff_map, 12,
|
vp6_huff_coeff_map, 12,
|
||||||
AC_DC_HUFF_BITS,
|
AC_DC_HUFF_BITS,
|
||||||
&s->ract_vlc[pt][ct][cg]))
|
&s->ract_vlc[pt][ct][cg]);
|
||||||
return -1;
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
memset(s->nb_null, 0, sizeof(s->nb_null));
|
memset(s->nb_null, 0, sizeof(s->nb_null));
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user