Skip to content

Commit

Permalink
Merge pull request #1491 from kaltura/master
Browse files Browse the repository at this point in the history
Align hls-id3-data-var branch with updated masterbranch
  • Loading branch information
david-winder-kaltura authored Nov 29, 2023
2 parents 5b4f6cb + 5701878 commit 27e2dc3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions vod/filters/audio_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,11 @@ audio_filter_init_source(
decoder->time_base.den,
decoder->sample_rate,
av_get_sample_fmt_name(decoder->sample_fmt),
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(8, 44, 100)
decoder->ch_layout.u.mask);
#else
decoder->channel_layout);
#endif

avrc = avfilter_graph_create_filter(
&source->buffer_src,
Expand Down Expand Up @@ -732,8 +736,13 @@ audio_filter_alloc_state(
}
else
{
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(8, 44, 100)
encoder_params.channels = sink_link->ch_layout.nb_channels;
encoder_params.channel_layout = sink_link->ch_layout.u.mask;
#else
encoder_params.channels = sink_link->channels;
encoder_params.channel_layout = sink_link->channel_layout;
#endif
encoder_params.sample_rate = sink_link->sample_rate;
encoder_params.timescale = sink_link->time_base.den;
encoder_params.bitrate = output_track->media_info.bitrate;
Expand Down
3 changes: 0 additions & 3 deletions vod/hds/hds_amf0_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ hds_amf0_write_metadata(u_char* p, media_set_t* media_set, media_track_t** track
uint64_t duration;
uint32_t timescale;
uint32_t count;
uint32_t bitrate = 0;
uint8_t sound_format;

count = AMF0_COMMON_FIELDS_COUNT;
Expand Down Expand Up @@ -155,7 +154,6 @@ hds_amf0_write_metadata(u_char* p, media_set_t* media_set, media_track_t** track
if (tracks[MEDIA_TYPE_VIDEO] != NULL)
{
media_info = &tracks[MEDIA_TYPE_VIDEO]->media_info;
bitrate += media_info->bitrate;
p = hds_amf0_append_array_number_value(p, &amf0_width, media_info->u.video.width);
p = hds_amf0_append_array_number_value(p, &amf0_height, media_info->u.video.height);
p = hds_amf0_append_array_number_value(p, &amf0_videodatarate, (double)media_info->bitrate / 1000.0);
Expand All @@ -166,7 +164,6 @@ hds_amf0_write_metadata(u_char* p, media_set_t* media_set, media_track_t** track
if (tracks[MEDIA_TYPE_AUDIO] != NULL)
{
media_info = &tracks[MEDIA_TYPE_AUDIO]->media_info;
bitrate += media_info->bitrate;
p = hds_amf0_append_array_number_value(p, &amf0_audiodatarate, (double)media_info->bitrate / 1000.0);
p = hds_amf0_append_array_number_value(p, &amf0_audiosamplerate, media_info->u.audio.sample_rate);
p = hds_amf0_append_array_number_value(p, &amf0_audiosamplesize, media_info->u.audio.bits_per_sample);
Expand Down
2 changes: 2 additions & 0 deletions vod/thumb/thumb_grabber.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ static codec_id_mapping_t codec_mappings[] = {
{ VOD_CODEC_ID_HEVC, AV_CODEC_ID_H265, "h265" },
{ VOD_CODEC_ID_VP8, AV_CODEC_ID_VP8, "vp8" },
{ VOD_CODEC_ID_VP9, AV_CODEC_ID_VP9, "vp9" },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 89, 100)
{ VOD_CODEC_ID_AV1, AV_CODEC_ID_AV1, "av1" },
#endif
};

void
Expand Down

0 comments on commit 27e2dc3

Please sign in to comment.