Commit 00ccbbe7 authored by alexc's avatar alexc

Allow PS envelope fixup when ps->num_env_old <= 1.

It is already rejected by the "source >= 0 && source != ps->num_env" 0 envelope
case and is perfectly legally for the suppressed final envelope case.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23661 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ebc0bc8e
......@@ -235,13 +235,13 @@ int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps
//Create a fake envelope
int source = ps->num_env ? ps->num_env - 1 : ps->num_env_old - 1;
if (source >= 0 && source != ps->num_env) {
if (ps->enable_iid && ps->num_env_old > 1) {
if (ps->enable_iid) {
memcpy(ps->iid_par+ps->num_env, ps->iid_par+source, sizeof(ps->iid_par[0]));
}
if (ps->enable_icc && ps->num_env_old > 1) {
if (ps->enable_icc) {
memcpy(ps->icc_par+ps->num_env, ps->icc_par+source, sizeof(ps->icc_par[0]));
}
if (ps->enable_ipdopd && ps->num_env_old > 1) {
if (ps->enable_ipdopd) {
memcpy(ps->ipd_par+ps->num_env, ps->ipd_par+source, sizeof(ps->ipd_par[0]));
memcpy(ps->opd_par+ps->num_env, ps->opd_par+source, sizeof(ps->opd_par[0]));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment