Skip to content

Commit

Permalink
Fixed broken AV1 post-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Feb 8, 2021
1 parent 09daec4 commit 0ba74fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions postprocessing/pp-av1.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ int janus_pp_av1_create(char *destination, char *metadata, gboolean faststart) {
#ifdef USE_CODECPAR
#if LIBAVCODEC_VER_AT_LEAST(57, 25)
AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_AV1);
#endif
#else
if(!codec) {
/* Error opening video codec */
JANUS_LOG(LOG_ERR, "Encoder not available\n");
return -1;
}
#endif
fctx->video_codec = codec;
fctx->oformat->video_codec = codec->id;
vStream = avformat_new_stream(fctx, codec);
Expand Down Expand Up @@ -249,8 +250,8 @@ static void janus_pp_av1_parse_sh(char *buffer, uint16_t *width, uint16_t *heigh
if(value)
initial_display_delay = TRUE;
/* Skip operating_points_cnt_minus_1 (5 bits) */
value = janus_pp_av1_getbits(base, 5, &offset)+1;
for(i=0; i<value; i++) {
uint32_t opcm1 = janus_pp_av1_getbits(base, 5, &offset)+1;
for(i=0; i<opcm1; i++) {
/* Skip operating_point_idc[i] (12 bits) */
janus_pp_av1_getbits(base, 12, &offset);
/* Skip seq_level_idx[i] (5 bits) */
Expand Down

0 comments on commit 0ba74fb

Please sign in to comment.