History

avcodec/packet_internal: make avpriv_packet_list_* functions use an internal struct

The next pointer is kept at the end for backwards compatability until the major bump, when it should ideally be moved at the front.

James Almer committed 5 years ago

Commit d422b2e1 parent f7db77b16 files · +67 −58Browse files

Showing the changes to libavdevice/decklink_dec.cpp (1 of 16 files). Show all

Unified · Split

libavdevice/decklink_dec.cpp+5−4
@@ -35,6 +35,7 @@ extern "C" { · 34 unmodified lines
35 35
36extern "C" {36extern "C" {
37#include "config.h"37#include "config.h"
38#include "libavcodec/packet_internal.h"
38#include "libavformat/avformat.h"39#include "libavformat/avformat.h"
39#include "libavutil/avassert.h"40#include "libavutil/avassert.h"
40#include "libavutil/avutil.h"41#include "libavutil/avutil.h"
@@ -482,7 +483,7 @@ static void avpacket_queue_init(AVFormatContext *avctx, AVPacketQueue *q) · 441 unmodified lines
482 483
483static void avpacket_queue_flush(AVPacketQueue *q)484static void avpacket_queue_flush(AVPacketQueue *q)
484{485{
485 AVPacketList *pkt, *pkt1;486 PacketList *pkt, *pkt1;
486 487
487 pthread_mutex_lock(&q->mutex);488 pthread_mutex_lock(&q->mutex);
488 for (pkt = q->first_pkt; pkt != NULL; pkt = pkt1) {489 for (pkt = q->first_pkt; pkt != NULL; pkt = pkt1) {
@@ -515,7 +516,7 @@ static unsigned long long avpacket_queue_size(AVPacketQueue *q) · 26 unmodified lines
515 516
516static int avpacket_queue_put(AVPacketQueue *q, AVPacket *pkt)517static int avpacket_queue_put(AVPacketQueue *q, AVPacket *pkt)
517{518{
518 AVPacketList *pkt1;519 PacketList *pkt1;
519 520
520 // Drop Packet if queue size is > maximum queue size521 // Drop Packet if queue size is > maximum queue size
521 if (avpacket_queue_size(q) > (uint64_t)q->max_q_size) {522 if (avpacket_queue_size(q) > (uint64_t)q->max_q_size) {
@@ -529,7 +530,7 @@ static int avpacket_queue_put(AVPacketQueue *q, AVPacket *pkt) · 7 unmodified lines
529 return -1;530 return -1;
530 }531 }
531 532
532 pkt1 = (AVPacketList *)av_malloc(sizeof(AVPacketList));533 pkt1 = (PacketList *)av_malloc(sizeof(PacketList));
533 if (!pkt1) {534 if (!pkt1) {
534 av_packet_unref(pkt);535 av_packet_unref(pkt);
535 return -1;536 return -1;
@@ -557,7 +558,7 @@ static int avpacket_queue_put(AVPacketQueue *q, AVPacket *pkt) · 21 unmodified lines
557 558
558static int avpacket_queue_get(AVPacketQueue *q, AVPacket *pkt, int block)559static int avpacket_queue_get(AVPacketQueue *q, AVPacket *pkt, int block)
559{560{
560 AVPacketList *pkt1;561 PacketList *pkt1;
561 int ret;562 int ret;
562 563
563 pthread_mutex_lock(&q->mutex);564 pthread_mutex_lock(&q->mutex);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t