avformat/mpegts: simplify ac3/eac3 descriptor handling
those lines are literally the same, so removing the code duplication
This commit is contained in:
committed by
Marton Balint
parent
cda069b092
commit
dd020e1025
@@ -2322,19 +2322,6 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
|
||||
}
|
||||
break;
|
||||
case AC3_DESCRIPTOR:
|
||||
{
|
||||
int component_type_flag = get8(pp, desc_end) & (1 << 7);
|
||||
if (component_type_flag) {
|
||||
int component_type = get8(pp, desc_end);
|
||||
int service_type_mask = 0x38; // 0b00111000
|
||||
int service_type = ((component_type & service_type_mask) >> 3);
|
||||
if (service_type == 0x02 /* 0b010 */) {
|
||||
st->disposition |= AV_DISPOSITION_DESCRIPTIONS;
|
||||
av_log(ts ? ts->stream : fc, AV_LOG_DEBUG, "New track disposition for id %u: %u\n", st->id, st->disposition);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ENHANCED_AC3_DESCRIPTOR:
|
||||
{
|
||||
int component_type_flag = get8(pp, desc_end) & (1 << 7);
|
||||
|
||||
Reference in New Issue
Block a user