MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / av_new_program

Function av_new_program

libavformat/utils.c:2534–2557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2532}
2533
2534AVProgram *av_new_program(AVFormatContext *ac, int id)
2535{
2536 AVProgram *program=NULL;
2537 int i;
2538
2539#ifdef DEBUG_SI
2540 av_log(ac, AV_LOG_DEBUG, "new_program: id=0x%04x\n", id);
2541#endif
2542
2543 for(i=0; i<ac->nb_programs; i++)
2544 if(ac->programs[i]->id == id)
2545 program = ac->programs[i];
2546
2547 if(!program){
2548 program = av_mallocz(sizeof(AVProgram));
2549 if (!program)
2550 return NULL;
2551 dynarray_add(&ac->programs, &ac->nb_programs, program);
2552 program->discard = AVDISCARD_NONE;
2553 }
2554 program->id = id;
2555
2556 return program;
2557}
2558
2559AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title)
2560{

Callers 2

pat_cbFunction · 0.85
sdt_cbFunction · 0.85

Calls 2

av_logFunction · 0.85
av_malloczFunction · 0.85

Tested by

no test coverage detected