Skip to content

Commit

Permalink
fixed #2485
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed May 31, 2023
1 parent 53387aa commit 78e539b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/filters/dasher.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,18 +1415,20 @@ static GF_Err dasher_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is
else if (ds->codec_id == GF_CODECID_AVC || ds->codec_id == GF_CODECID_SVC || ds->codec_id == GF_CODECID_MVC) {
AVCState avc;
GF_AVCConfig* avccfg = gf_odf_avc_cfg_read(dsi->value.data.ptr, dsi->value.data.size);
GF_NALUFFParam *sl = (GF_NALUFFParam *)gf_list_get(avccfg->sequenceParameterSets, 0);
if (sl) {
s32 idx;
memset(&avc, 0, sizeof(AVCState));
idx = gf_avc_read_sps(sl->data, sl->size, &avc, 0, NULL);
if (idx>=0) {
Bool is_interlaced = avc.sps[idx].frame_mbs_only_flag ? GF_FALSE : GF_TRUE;
if (ds->interlaced != is_interlaced) period_switch = GF_TRUE;
ds->interlaced = is_interlaced;
if (avccfg) {
GF_NALUFFParam *sl = (GF_NALUFFParam *)gf_list_get(avccfg->sequenceParameterSets, 0);
if (sl) {
s32 idx;
memset(&avc, 0, sizeof(AVCState));
idx = gf_avc_read_sps(sl->data, sl->size, &avc, 0, NULL);
if (idx>=0) {
Bool is_interlaced = avc.sps[idx].frame_mbs_only_flag ? GF_FALSE : GF_TRUE;
if (ds->interlaced != is_interlaced) period_switch = GF_TRUE;
ds->interlaced = is_interlaced;
}
}
gf_odf_avc_cfg_del(avccfg);
}
gf_odf_avc_cfg_del(avccfg);
}
}
#endif /*!GPAC_DISABLE_AV_PARSERS*/
Expand Down

0 comments on commit 78e539b

Please sign in to comment.