The next pointer is kept at the end for backwards compatability until the major bump, when it should ideally be moved at the front.
Unified · Split
| @@ -737,13 +737,13 @@ FF_ENABLE_DEPRECATION_WARNINGS · 736 unmodified lines | ||
| 737 | 737 | #endif |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | −int avpriv_packet_list_put(AVPacketList **packet_buffer, | |
| 741 | − AVPacketList **plast_pktl, | |
| 740 | +int avpriv_packet_list_put(PacketList **packet_buffer, | |
| 741 | + PacketList **plast_pktl, | |
| 742 | 742 | AVPacket *pkt, |
| 743 | 743 | int (*copy)(AVPacket *dst, const AVPacket *src), |
| 744 | 744 | int flags) |
| 745 | 745 | { |
| 746 | − AVPacketList *pktl = av_mallocz(sizeof(AVPacketList)); | |
| 746 | + PacketList *pktl = av_mallocz(sizeof(PacketList)); | |
| 747 | 747 | int ret; |
| 748 | 748 | |
| 749 | 749 | if (!pktl) |
| @@ -774,11 +774,11 @@ int avpriv_packet_list_put(AVPacketList **packet_buffer, · 24 unmodified lines | ||
| 774 | 774 | return 0; |
| 775 | 775 | } |
| 776 | 776 | |
| 777 | −int avpriv_packet_list_get(AVPacketList **pkt_buffer, | |
| 778 | − AVPacketList **pkt_buffer_end, | |
| 777 | +int avpriv_packet_list_get(PacketList **pkt_buffer, | |
| 778 | + PacketList **pkt_buffer_end, | |
| 779 | 779 | AVPacket *pkt) |
| 780 | 780 | { |
| 781 | − AVPacketList *pktl; | |
| 781 | + PacketList *pktl; | |
| 782 | 782 | if (!*pkt_buffer) |
| 783 | 783 | return AVERROR(EAGAIN); |
| 784 | 784 | pktl = *pkt_buffer; |
| @@ -790,12 +790,12 @@ int avpriv_packet_list_get(AVPacketList **pkt_buffer, · 5 unmodified lines | ||
| 790 | 790 | return 0; |
| 791 | 791 | } |
| 792 | 792 | |
| 793 | −void avpriv_packet_list_free(AVPacketList **pkt_buf, AVPacketList **pkt_buf_end) | |
| 793 | +void avpriv_packet_list_free(PacketList **pkt_buf, PacketList **pkt_buf_end) | |
| 794 | 794 | { |
| 795 | − AVPacketList *tmp = *pkt_buf; | |
| 795 | + PacketList *tmp = *pkt_buf; | |
| 796 | 796 | |
| 797 | 797 | while (tmp) { |
| 798 | − AVPacketList *pktl = tmp; | |
| 798 | + PacketList *pktl = tmp; | |
| 799 | 799 | tmp = pktl->next; |
| 800 | 800 | av_packet_unref(&pktl->pkt); |
| 801 | 801 | av_freep(&pktl); |
| @@ -23,6 +23,10 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | #include "packet.h" |
| 25 | 25 | |
| 26 | +typedef struct PacketList { | |
| 27 | + AVPacket pkt; | |
| 28 | + struct PacketList *next; | |
| 29 | +} PacketList; | |
| 26 | 30 | |
| 27 | 31 | /** |
| 28 | 32 | * Append an AVPacket to the list. |
| @@ -37,7 +41,7 @@ · 8 unmodified lines | ||
| 37 | 41 | * @return 0 on success, negative AVERROR value on failure. On failure, |
| 38 | 42 | the packet and the list are unchanged. |
| 39 | 43 | */ |
| 40 | −int avpriv_packet_list_put(AVPacketList **head, AVPacketList **tail, | |
| 44 | +int avpriv_packet_list_put(PacketList **head, PacketList **tail, | |
| 41 | 45 | AVPacket *pkt, |
| 42 | 46 | int (*copy)(AVPacket *dst, const AVPacket *src), |
| 43 | 47 | int flags); |
| @@ -54,7 +58,7 @@ int avpriv_packet_list_put(AVPacketList **head, AVPacketList **tail, · 10 unmodified lines | ||
| 54 | 58 | * @return 0 on success, and a packet is returned. AVERROR(EAGAIN) if |
| 55 | 59 | * the list was empty. |
| 56 | 60 | */ |
| 57 | −int avpriv_packet_list_get(AVPacketList **head, AVPacketList **tail, | |
| 61 | +int avpriv_packet_list_get(PacketList **head, PacketList **tail, | |
| 58 | 62 | AVPacket *pkt); |
| 59 | 63 | |
| 60 | 64 | /** |
| @@ -63,7 +67,7 @@ int avpriv_packet_list_get(AVPacketList **head, AVPacketList **tail, · 2 unmodified lines | ||
| 63 | 67 | * @param head List head element |
| 64 | 68 | * @param tail List tail element |
| 65 | 69 | */ |
| 66 | −void avpriv_packet_list_free(AVPacketList **head, AVPacketList **tail); | |
| 70 | +void avpriv_packet_list_free(PacketList **head, PacketList **tail); | |
| 67 | 71 | |
| 68 | 72 | int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type); |
| 69 | 73 | |
| @@ -75,7 +75,7 @@ class decklink_output_callback; · 74 unmodified lines | ||
| 75 | 75 | class decklink_input_callback; |
| 76 | 76 | |
| 77 | 77 | typedef struct AVPacketQueue { |
| 78 | − AVPacketList *first_pkt, *last_pkt; | |
| 78 | + PacketList *first_pkt, *last_pkt; | |
| 79 | 79 | int nb_packets; |
| 80 | 80 | unsigned long long size; |
| 81 | 81 | int abort_request; |
| @@ -35,6 +35,7 @@ extern "C" { · 34 unmodified lines | ||
| 35 | 35 | |
| 36 | 36 | extern "C" { |
| 37 | 37 | #include "config.h" |
| 38 | +#include "libavcodec/packet_internal.h" | |
| 38 | 39 | #include "libavformat/avformat.h" |
| 39 | 40 | #include "libavutil/avassert.h" |
| 40 | 41 | #include "libavutil/avutil.h" |
| @@ -482,7 +483,7 @@ static void avpacket_queue_init(AVFormatContext *avctx, AVPacketQueue *q) · 441 unmodified lines | ||
| 482 | 483 | |
| 483 | 484 | static void avpacket_queue_flush(AVPacketQueue *q) |
| 484 | 485 | { |
| 485 | − AVPacketList *pkt, *pkt1; | |
| 486 | + PacketList *pkt, *pkt1; | |
| 486 | 487 | |
| 487 | 488 | pthread_mutex_lock(&q->mutex); |
| 488 | 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 | |
| 516 | 517 | static int avpacket_queue_put(AVPacketQueue *q, AVPacket *pkt) |
| 517 | 518 | { |
| 518 | − AVPacketList *pkt1; | |
| 519 | + PacketList *pkt1; | |
| 519 | 520 | |
| 520 | 521 | // Drop Packet if queue size is > maximum queue size |
| 521 | 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 | 530 | return -1; |
| 530 | 531 | } |
| 531 | 532 | |
| 532 | − pkt1 = (AVPacketList *)av_malloc(sizeof(AVPacketList)); | |
| 533 | + pkt1 = (PacketList *)av_malloc(sizeof(PacketList)); | |
| 533 | 534 | if (!pkt1) { |
| 534 | 535 | av_packet_unref(pkt); |
| 535 | 536 | return -1; |
| @@ -557,7 +558,7 @@ static int avpacket_queue_put(AVPacketQueue *q, AVPacket *pkt) · 21 unmodified lines | ||
| 557 | 558 | |
| 558 | 559 | static int avpacket_queue_get(AVPacketQueue *q, AVPacket *pkt, int block) |
| 559 | 560 | { |
| 560 | − AVPacketList *pkt1; | |
| 561 | + PacketList *pkt1; | |
| 561 | 562 | int ret; |
| 562 | 563 | |
| 563 | 564 | pthread_mutex_lock(&q->mutex); |
| @@ -58,7 +58,7 @@ static int · 57 unmodified lines | ||
| 58 | 58 | dshow_read_close(AVFormatContext *s) |
| 59 | 59 | { |
| 60 | 60 | struct dshow_ctx *ctx = s->priv_data; |
| 61 | − AVPacketList *pktl; | |
| 61 | + PacketList *pktl; | |
| 62 | 62 | |
| 63 | 63 | if (ctx->control) { |
| 64 | 64 | IMediaControl_Stop(ctx->control); |
| @@ -118,7 +118,7 @@ dshow_read_close(AVFormatContext *s) · 53 unmodified lines | ||
| 118 | 118 | |
| 119 | 119 | pktl = ctx->pktl; |
| 120 | 120 | while (pktl) { |
| 121 | − AVPacketList *next = pktl->next; | |
| 121 | + PacketList *next = pktl->next; | |
| 122 | 122 | av_packet_unref(&pktl->pkt); |
| 123 | 123 | av_free(pktl); |
| 124 | 124 | pktl = next; |
| @@ -162,7 +162,7 @@ callback(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, e · 37 unmodified lines | ||
| 162 | 162 | { |
| 163 | 163 | AVFormatContext *s = priv_data; |
| 164 | 164 | struct dshow_ctx *ctx = s->priv_data; |
| 165 | − AVPacketList **ppktl, *pktl_next; | |
| 165 | + PacketList **ppktl, *pktl_next; | |
| 166 | 166 | |
| 167 | 167 | // dump_videohdr(s, vdhdr); |
| 168 | 168 | |
| @@ -171,7 +171,7 @@ callback(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, e · 2 unmodified lines | ||
| 171 | 171 | if(shall_we_drop(s, index, devtype)) |
| 172 | 172 | goto fail; |
| 173 | 173 | |
| 174 | − pktl_next = av_mallocz(sizeof(AVPacketList)); | |
| 174 | + pktl_next = av_mallocz(sizeof(PacketList)); | |
| 175 | 175 | if(!pktl_next) |
| 176 | 176 | goto fail; |
| 177 | 177 | |
| @@ -1262,7 +1262,7 @@ static int dshow_check_event_queue(IMediaEvent *media_event) · 1084 unmodified lines | ||
| 1262 | 1262 | static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 1263 | 1263 | { |
| 1264 | 1264 | struct dshow_ctx *ctx = s->priv_data; |
| 1265 | − AVPacketList *pktl = NULL; | |
| 1265 | + PacketList *pktl = NULL; | |
| 1266 | 1266 | |
| 1267 | 1267 | while (!ctx->eof && !pktl) { |
| 1268 | 1268 | WaitForSingleObject(ctx->mutex, INFINITE); |
| @@ -34,6 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | #include <dvdmedia.h> |
| 35 | 35 | |
| 36 | 36 | #include "libavcodec/internal.h" |
| 37 | +#include "libavcodec/packet_internal.h" | |
| 37 | 38 | |
| 38 | 39 | /* EC_DEVICE_LOST is not defined in MinGW dshow headers. */ |
| 39 | 40 | #ifndef EC_DEVICE_LOST |
| @@ -320,7 +321,7 @@ struct dshow_ctx { · 280 unmodified lines | ||
| 320 | 321 | HANDLE mutex; |
| 321 | 322 | HANDLE event[2]; /* event[0] is set by DirectShow |
| 322 | 323 | * event[1] is set by callback() */ |
| 323 | − AVPacketList *pktl; | |
| 324 | + PacketList *pktl; | |
| 324 | 325 | |
| 325 | 326 | int eof; |
| 326 | 327 | |
| @@ -24,6 +24,7 @@ · 23 unmodified lines | ||
| 24 | 24 | #include "libavutil/opt.h" |
| 25 | 25 | #include "libavutil/parseutils.h" |
| 26 | 26 | |
| 27 | +#include "libavcodec/packet_internal.h" | |
| 27 | 28 | #include "libavformat/internal.h" |
| 28 | 29 | |
| 29 | 30 | // windows.h must no be included before winsock2.h, and libavformat internal |
| @@ -44,7 +45,7 @@ struct vfw_ctx { · 14 unmodified lines | ||
| 44 | 45 | HWND hwnd; |
| 45 | 46 | HANDLE mutex; |
| 46 | 47 | HANDLE event; |
| 47 | − AVPacketList *pktl; | |
| 48 | + PacketList *pktl; | |
| 48 | 49 | unsigned int curbufsize; |
| 49 | 50 | unsigned int frame_num; |
| 50 | 51 | char *video_size; /**< A string describing video size, set by a private option. */ |
| @@ -178,7 +179,7 @@ static LRESULT CALLBACK videostream_cb(HWND hwnd, LPVIDEOHDR vdhdr) · 127 unmodified lines | ||
| 178 | 179 | { |
| 179 | 180 | AVFormatContext *s; |
| 180 | 181 | struct vfw_ctx *ctx; |
| 181 | − AVPacketList **ppktl, *pktl_next; | |
| 182 | + PacketList **ppktl, *pktl_next; | |
| 182 | 183 | |
| 183 | 184 | s = (AVFormatContext *) GetWindowLongPtr(hwnd, GWLP_USERDATA); |
| 184 | 185 | ctx = s->priv_data; |
| @@ -190,7 +191,7 @@ static LRESULT CALLBACK videostream_cb(HWND hwnd, LPVIDEOHDR vdhdr) · 5 unmodified lines | ||
| 190 | 191 | |
| 191 | 192 | WaitForSingleObject(ctx->mutex, INFINITE); |
| 192 | 193 | |
| 193 | − pktl_next = av_mallocz(sizeof(AVPacketList)); | |
| 194 | + pktl_next = av_mallocz(sizeof(PacketList)); | |
| 194 | 195 | if(!pktl_next) |
| 195 | 196 | goto fail; |
| 196 | 197 | |
| @@ -219,7 +220,7 @@ fail: · 22 unmodified lines | ||
| 219 | 220 | static int vfw_read_close(AVFormatContext *s) |
| 220 | 221 | { |
| 221 | 222 | struct vfw_ctx *ctx = s->priv_data; |
| 222 | − AVPacketList *pktl; | |
| 223 | + PacketList *pktl; | |
| 223 | 224 | |
| 224 | 225 | if(ctx->hwnd) { |
| 225 | 226 | SendMessage(ctx->hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0); |
| @@ -233,7 +234,7 @@ static int vfw_read_close(AVFormatContext *s) · 7 unmodified lines | ||
| 233 | 234 | |
| 234 | 235 | pktl = ctx->pktl; |
| 235 | 236 | while (pktl) { |
| 236 | − AVPacketList *next = pktl->next; | |
| 237 | + PacketList *next = pktl->next; | |
| 237 | 238 | av_packet_unref(&pktl->pkt); |
| 238 | 239 | av_free(pktl); |
| 239 | 240 | pktl = next; |
| @@ -439,7 +440,7 @@ fail: · 199 unmodified lines | ||
| 439 | 440 | static int vfw_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 440 | 441 | { |
| 441 | 442 | struct vfw_ctx *ctx = s->priv_data; |
| 442 | − AVPacketList *pktl = NULL; | |
| 443 | + PacketList *pktl = NULL; | |
| 443 | 444 | |
| 444 | 445 | while(!pktl) { |
| 445 | 446 | WaitForSingleObject(ctx->mutex, INFINITE); |
| @@ -37,7 +37,7 @@ typedef struct AIFFOutputContext { · 36 unmodified lines | ||
| 37 | 37 | int64_t frames; |
| 38 | 38 | int64_t ssnd; |
| 39 | 39 | int audio_stream_idx; |
| 40 | − AVPacketList *pict_list, *pict_list_end; | |
| 40 | + PacketList *pict_list, *pict_list_end; | |
| 41 | 41 | int write_id3v2; |
| 42 | 42 | int id3v2_version; |
| 43 | 43 | } AIFFOutputContext; |
| @@ -48,7 +48,7 @@ static int put_id3v2_tags(AVFormatContext *s, AIFFOutputContext *aiff) · 4 unmodified lines | ||
| 48 | 48 | uint64_t pos, end, size; |
| 49 | 49 | ID3v2EncContext id3v2 = { 0 }; |
| 50 | 50 | AVIOContext *pb = s->pb; |
| 51 | − AVPacketList *pict_list = aiff->pict_list; | |
| 51 | + PacketList *pict_list = aiff->pict_list; | |
| 52 | 52 | |
| 53 | 53 | if (!s->metadata && !s->nb_chapters && !aiff->pict_list) |
| 54 | 54 | return 0; |
| @@ -39,7 +39,7 @@ typedef struct FlacMuxerContext { · 38 unmodified lines | ||
| 39 | 39 | int audio_stream_idx; |
| 40 | 40 | int waiting_pics; |
| 41 | 41 | /* audio packets are queued here until we get all the attached pictures */ |
| 42 | − AVPacketList *queue, *queue_end; | |
| 42 | + PacketList *queue, *queue_end; | |
| 43 | 43 | |
| 44 | 44 | /* updated streaminfo sent by the encoder at the end */ |
| 45 | 45 | uint8_t streaminfo[FLAC_STREAMINFO_SIZE]; |
| @@ -73,8 +73,8 @@ struct AVFormatInternal { · 72 unmodified lines | ||
| 73 | 73 | * not decoded, for example to get the codec parameters in MPEG |
| 74 | 74 | * streams. |
| 75 | 75 | */ |
| 76 | − struct AVPacketList *packet_buffer; | |
| 77 | − struct AVPacketList *packet_buffer_end; | |
| 76 | + struct PacketList *packet_buffer; | |
| 77 | + struct PacketList *packet_buffer_end; | |
| 78 | 78 | |
| 79 | 79 | /* av_seek_frame() support */ |
| 80 | 80 | int64_t data_offset; /**< offset of the first packet */ |
| @@ -85,13 +85,13 @@ struct AVFormatInternal { · 4 unmodified lines | ||
| 85 | 85 | * be identified, as parsing cannot be done without knowing the |
| 86 | 86 | * codec. |
| 87 | 87 | */ |
| 88 | − struct AVPacketList *raw_packet_buffer; | |
| 89 | − struct AVPacketList *raw_packet_buffer_end; | |
| 88 | + struct PacketList *raw_packet_buffer; | |
| 89 | + struct PacketList *raw_packet_buffer_end; | |
| 90 | 90 | /** |
| 91 | 91 | * Packets split by the parser get queued here. |
| 92 | 92 | */ |
| 93 | − struct AVPacketList *parse_queue; | |
| 94 | − struct AVPacketList *parse_queue_end; | |
| 93 | + struct PacketList *parse_queue; | |
| 94 | + struct PacketList *parse_queue_end; | |
| 95 | 95 | /** |
| 96 | 96 | * Remaining size available for raw_packet_buffer, in bytes. |
| 97 | 97 | */ |
| @@ -347,7 +347,7 @@ struct AVStreamInternal { · 249 unmodified lines | ||
| 347 | 347 | /** |
| 348 | 348 | * last packet in packet_buffer for this stream when muxing. |
| 349 | 349 | */ |
| 350 | − struct AVPacketList *last_in_packet_buffer; | |
| 350 | + struct PacketList *last_in_packet_buffer; | |
| 351 | 351 | }; |
| 352 | 352 | |
| 353 | 353 | #ifdef __GNUC__ |
| @@ -382,8 +382,8 @@ typedef struct MatroskaDemuxContext { · 381 unmodified lines | ||
| 382 | 382 | int64_t segment_start; |
| 383 | 383 | |
| 384 | 384 | /* the packet queue */ |
| 385 | − AVPacketList *queue; | |
| 386 | − AVPacketList *queue_end; | |
| 385 | + PacketList *queue; | |
| 386 | + PacketList *queue_end; | |
| 387 | 387 | |
| 388 | 388 | int done; |
| 389 | 389 | |
| @@ -132,7 +132,7 @@ typedef struct MP3Context { · 131 unmodified lines | ||
| 132 | 132 | int pics_to_write; |
| 133 | 133 | |
| 134 | 134 | /* audio packets are queued here until we get all the attached pictures */ |
| 135 | − AVPacketList *queue, *queue_end; | |
| 135 | + PacketList *queue, *queue_end; | |
| 136 | 136 | } MP3Context; |
| 137 | 137 | |
| 138 | 138 | static const uint8_t xing_offtbl[2][2] = {{32, 17}, {17, 9}}; |
| @@ -22,6 +22,7 @@ · 21 unmodified lines | ||
| 22 | 22 | #include "avformat.h" |
| 23 | 23 | #include "internal.h" |
| 24 | 24 | #include "libavcodec/internal.h" |
| 25 | +#include "libavcodec/packet_internal.h" | |
| 25 | 26 | #include "libavutil/opt.h" |
| 26 | 27 | #include "libavutil/dict.h" |
| 27 | 28 | #include "libavutil/pixdesc.h" |
| @@ -830,11 +831,11 @@ int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, · 802 unmodified lines | ||
| 830 | 831 | int (*compare)(AVFormatContext *, const AVPacket *, const AVPacket *)) |
| 831 | 832 | { |
| 832 | 833 | int ret; |
| 833 | − AVPacketList **next_point, *this_pktl; | |
| 834 | + PacketList **next_point, *this_pktl; | |
| 834 | 835 | AVStream *st = s->streams[pkt->stream_index]; |
| 835 | 836 | int chunked = s->max_chunk_size || s->max_chunk_duration; |
| 836 | 837 | |
| 837 | − this_pktl = av_malloc(sizeof(AVPacketList)); | |
| 838 | + this_pktl = av_malloc(sizeof(PacketList)); | |
| 838 | 839 | if (!this_pktl) { |
| 839 | 840 | av_packet_unref(pkt); |
| 840 | 841 | return AVERROR(ENOMEM); |
| @@ -931,7 +932,7 @@ static int interleave_compare_dts(AVFormatContext *s, const AVPacket *next, · 90 unmodified lines | ||
| 931 | 932 | int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, |
| 932 | 933 | AVPacket *pkt, int flush) |
| 933 | 934 | { |
| 934 | − AVPacketList *pktl; | |
| 935 | + PacketList *pktl; | |
| 935 | 936 | int stream_count = 0; |
| 936 | 937 | int noninterleaved_count = 0; |
| 937 | 938 | int i, ret; |
| @@ -968,7 +969,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, · 30 unmodified lines | ||
| 968 | 969 | |
| 969 | 970 | for (i = 0; i < s->nb_streams; i++) { |
| 970 | 971 | int64_t last_dts; |
| 971 | − const AVPacketList *last = s->streams[i]->internal->last_in_packet_buffer; | |
| 972 | + const PacketList *last = s->streams[i]->internal->last_in_packet_buffer; | |
| 972 | 973 | |
| 973 | 974 | if (!last) |
| 974 | 975 | continue; |
| @@ -1064,7 +1065,7 @@ int ff_get_muxer_ts_offset(AVFormatContext *s, int stream_index, int64_t *offset · 89 unmodified lines | ||
| 1064 | 1065 | |
| 1065 | 1066 | const AVPacket *ff_interleaved_peek(AVFormatContext *s, int stream) |
| 1066 | 1067 | { |
| 1067 | − AVPacketList *pktl = s->internal->packet_buffer; | |
| 1068 | + PacketList *pktl = s->internal->packet_buffer; | |
| 1068 | 1069 | while (pktl) { |
| 1069 | 1070 | if (pktl->pkt.stream_index == stream) { |
| 1070 | 1071 | return &pktl->pkt; |
| @@ -53,6 +53,7 @@ · 52 unmodified lines | ||
| 53 | 53 | #include "libavcodec/h264_ps.h" |
| 54 | 54 | #include "libavcodec/golomb.h" |
| 55 | 55 | #include "libavcodec/internal.h" |
| 56 | +#include "libavcodec/packet_internal.h" | |
| 56 | 57 | #include "avformat.h" |
| 57 | 58 | #include "avio_internal.h" |
| 58 | 59 | #include "internal.h" |
| @@ -3104,9 +3105,9 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket · 3045 unmodified lines | ||
| 3104 | 3105 | stream_count += !!s->streams[i]->internal->last_in_packet_buffer; |
| 3105 | 3106 | |
| 3106 | 3107 | if (stream_count && (s->nb_streams == stream_count || flush)) { |
| 3107 | − AVPacketList *pktl = s->internal->packet_buffer; | |
| 3108 | + PacketList *pktl = s->internal->packet_buffer; | |
| 3108 | 3109 | if (s->nb_streams != stream_count) { |
| 3109 | − AVPacketList *last = NULL; | |
| 3110 | + PacketList *last = NULL; | |
| 3110 | 3111 | // find last packet in edit unit |
| 3111 | 3112 | while (pktl) { |
| 3112 | 3113 | if (!stream_count || pktl->pkt.stream_index == 0) |
| @@ -3120,7 +3121,7 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket · 7 unmodified lines | ||
| 3120 | 3121 | } |
| 3121 | 3122 | // purge packet queue |
| 3122 | 3123 | while (pktl) { |
| 3123 | − AVPacketList *next = pktl->next; | |
| 3124 | + PacketList *next = pktl->next; | |
| 3124 | 3125 | av_packet_unref(&pktl->pkt); |
| 3125 | 3126 | av_freep(&pktl); |
| 3126 | 3127 | pktl = next; |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | typedef struct TTAMuxContext { |
| 32 | 32 | AVIOContext *seek_table; |
| 33 | − AVPacketList *queue, *queue_end; | |
| 33 | + PacketList *queue, *queue_end; | |
| 34 | 34 | uint32_t nb_samples; |
| 35 | 35 | int frame_size; |
| 36 | 36 | int last_frame; |
| @@ -812,7 +812,7 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt) · 811 unmodified lines | ||
| 812 | 812 | av_init_packet(pkt); |
| 813 | 813 | |
| 814 | 814 | for (;;) { |
| 815 | − AVPacketList *pktl = s->internal->raw_packet_buffer; | |
| 815 | + PacketList *pktl = s->internal->raw_packet_buffer; | |
| 816 | 816 | const AVPacket *pkt1; |
| 817 | 817 | |
| 818 | 818 | if (pktl) { |
| @@ -1020,7 +1020,7 @@ static int has_decode_delay_been_guessed(AVStream *st) · 201 unmodified lines | ||
| 1020 | 1020 | return st->internal->nb_decoded_frames >= 20; |
| 1021 | 1021 | } |
| 1022 | 1022 | |
| 1023 | −static AVPacketList *get_next_pkt(AVFormatContext *s, AVStream *st, AVPacketList *pktl) | |
| 1023 | +static PacketList *get_next_pkt(AVFormatContext *s, AVStream *st, PacketList *pktl) | |
| 1024 | 1024 | { |
| 1025 | 1025 | if (pktl->next) |
| 1026 | 1026 | return pktl->next; |
| @@ -1076,7 +1076,7 @@ static int64_t select_from_pts_buffer(AVStream *st, int64_t *pts_buffer, int64_t · 49 unmodified lines | ||
| 1076 | 1076 | * of the packets in a window. |
| 1077 | 1077 | */ |
| 1078 | 1078 | static void update_dts_from_pts(AVFormatContext *s, int stream_index, |
| 1079 | − AVPacketList *pkt_buffer) | |
| 1079 | + PacketList *pkt_buffer) | |
| 1080 | 1080 | { |
| 1081 | 1081 | AVStream *st = s->streams[stream_index]; |
| 1082 | 1082 | int delay = st->internal->avctx->has_b_frames; |
| @@ -1105,8 +1105,8 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, · 22 unmodified lines | ||
| 1105 | 1105 | int64_t dts, int64_t pts, AVPacket *pkt) |
| 1106 | 1106 | { |
| 1107 | 1107 | AVStream *st = s->streams[stream_index]; |
| 1108 | − AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue; | |
| 1109 | − AVPacketList *pktl_it; | |
| 1108 | + PacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue; | |
| 1109 | + PacketList *pktl_it; | |
| 1110 | 1110 | |
| 1111 | 1111 | uint64_t shift; |
| 1112 | 1112 | |
| @@ -1157,7 +1157,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, · 44 unmodified lines | ||
| 1157 | 1157 | static void update_initial_durations(AVFormatContext *s, AVStream *st, |
| 1158 | 1158 | int stream_index, int64_t duration) |
| 1159 | 1159 | { |
| 1160 | − AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue; | |
| 1160 | + PacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue; | |
| 1161 | 1161 | int64_t cur_dts = RELATIVE_TS_BASE; |
| 1162 | 1162 | |
| 1163 | 1163 | if (st->first_dts != AV_NOPTS_VALUE) { |
| @@ -1742,7 +1742,7 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt) · 578 unmodified lines | ||
| 1742 | 1742 | } |
| 1743 | 1743 | |
| 1744 | 1744 | for (;;) { |
| 1745 | − AVPacketList *pktl = s->internal->packet_buffer; | |
| 1745 | + PacketList *pktl = s->internal->packet_buffer; | |
| 1746 | 1746 | |
| 1747 | 1747 | if (pktl) { |
| 1748 | 1748 | AVPacket *next_pkt = &pktl->pkt; |