diff --git a/ffmpeg.c b/ffmpeg.c old mode 100644 new mode 100755 index cf53b91..6e23577 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2850,7 +2850,18 @@ static int transcode_init(void) return AVERROR(EINVAL); } } - +#if CONFIG_AV_PID_NUMBER_PASSTHRU + // If ingest is TS: transfer pid numbers from input format to output format context + // other than TS: 0x2000 as identification, pid number starts with start_pid i.e 256 + for(i=0;isource_index]->file_index]->ctx->iformat->name,"mpegts")) + output_files[ost->file_index]->ctx->pids_num[ost->index] = input_files[input_streams[ost->source_index]->file_index]->ctx->pids_num[input_streams[ost->source_index]->st->index]; + else + output_files[ost->file_index]->ctx->pids_num[ost->index] = 0x2000; + } +#endif /* init complex filtergraphs */ for (i = 0; i < nb_filtergraphs; i++) if ((ret = avfilter_graph_config(filtergraphs[i]->graph, NULL)) < 0)