avformat/utils: do not overwrite already existing program with defaults in av_new_program
av_new_program returns the existing program if that already exists, in that case it makes no sense to overwrite existing attributes. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
91e1625db1
commit
9298e8eb61
@ -4590,14 +4590,12 @@ AVProgram *av_new_program(AVFormatContext *ac, int id)
|
||||
dynarray_add(&ac->programs, &ac->nb_programs, program);
|
||||
program->discard = AVDISCARD_NONE;
|
||||
program->pmt_version = -1;
|
||||
program->id = id;
|
||||
program->pts_wrap_reference = AV_NOPTS_VALUE;
|
||||
program->pts_wrap_behavior = AV_PTS_WRAP_IGNORE;
|
||||
program->start_time =
|
||||
program->end_time = AV_NOPTS_VALUE;
|
||||
}
|
||||
program->id = id;
|
||||
program->pts_wrap_reference = AV_NOPTS_VALUE;
|
||||
program->pts_wrap_behavior = AV_PTS_WRAP_IGNORE;
|
||||
|
||||
program->start_time =
|
||||
program->end_time = AV_NOPTS_VALUE;
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user