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

Function packet_queue_init

fftools/ffplay.c:472–490  ·  view source on GitHub ↗

packet queue handling */

Source from the content-addressed store, hash-verified

470
471/* packet queue handling */
472static int packet_queue_init(PacketQueue *q)
473{
474 memset(q, 0, sizeof(PacketQueue));
475 q->pkt_list = av_fifo_alloc2(1, sizeof(MyAVPacketList), AV_FIFO_FLAG_AUTO_GROW);
476 if (!q->pkt_list)
477 return AVERROR(ENOMEM);
478 q->mutex = SDL_CreateMutex();
479 if (!q->mutex) {
480 av_log(NULL, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n", SDL_GetError());
481 return AVERROR(ENOMEM);
482 }
483 q->cond = SDL_CreateCond();
484 if (!q->cond) {
485 av_log(NULL, AV_LOG_FATAL, "SDL_CreateCond(): %s\n", SDL_GetError());
486 return AVERROR(ENOMEM);
487 }
488 q->abort_request = 1;
489 return 0;
490}
491
492static void packet_queue_flush(PacketQueue *q)
493{

Callers 1

stream_openFunction · 0.85

Calls 2

av_fifo_alloc2Function · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected