History

lavf: move demuxing-specific fields from FFFormatContext to FormatContextInternal

Anton Khirnov committed 2 years ago

Commit cb80ec01 parent 6d05e7e5 files · +85 −68Browse files

Unified · Split

5 files
  1. libavformat/avformat.c +7 −5
  2. libavformat/avformat_internal.h +31 −0
  3. libavformat/demux.c +40 −32
  4. libavformat/demux_utils.c +7 −6
  5. libavformat/internal.h +0 −25
libavformat/avformat.c+7−5
@@ -137,12 +137,13 @@ void ff_remove_stream_group(AVFormatContext *s, AVStreamGroup *stg) · 136 unmodified lines
137/* XXX: suppress the packet queue */137/* XXX: suppress the packet queue */
138void ff_flush_packet_queue(AVFormatContext *s)138void ff_flush_packet_queue(AVFormatContext *s)
139{139{
140 FFFormatContext *const si = ffformatcontext(s);140 FormatContextInternal *const fci = ff_fc_internal(s);
141 avpriv_packet_list_free(&si->parse_queue);141 FFFormatContext *const si = &fci->fc;
142 avpriv_packet_list_free(&fci->parse_queue);
142 avpriv_packet_list_free(&si->packet_buffer);143 avpriv_packet_list_free(&si->packet_buffer);
143 avpriv_packet_list_free(&si->raw_packet_buffer);144 avpriv_packet_list_free(&fci->raw_packet_buffer);
144 145
145 si->raw_packet_buffer_size = 0;146 fci->raw_packet_buffer_size = 0;
146}147}
147 148
148void avformat_free_context(AVFormatContext *s)149void avformat_free_context(AVFormatContext *s)
@@ -191,7 +192,8 @@ void avformat_free_context(AVFormatContext *s) · 42 unmodified lines
191 av_packet_free(&si->parse_pkt);192 av_packet_free(&si->parse_pkt);
192 av_freep(&s->streams);193 av_freep(&s->streams);
193 av_freep(&s->stream_groups);194 av_freep(&s->stream_groups);
194 ff_flush_packet_queue(s);195 if (s->iformat)
196 ff_flush_packet_queue(s);
195 av_freep(&s->url);197 av_freep(&s->url);
196 av_free(s);198 av_free(s);
197}199}
libavformat/avformat_internal.h+31−0
@@ -63,6 +63,37 @@ typedef struct FormatContextInternal { · 62 unmodified lines
63 int missing_ts_warning;63 int missing_ts_warning;
64#endif64#endif
65 };65 };
66
67 // demuxing only
68 struct {
69 /**
70 * Raw packets from the demuxer, prior to parsing and decoding.
71 * This buffer is used for buffering packets until the codec can
72 * be identified, as parsing cannot be done without knowing the
73 * codec.
74 */
75 PacketList raw_packet_buffer;
76
77 /**
78 * Sum of the size of packets in raw_packet_buffer, in bytes.
79 */
80 int raw_packet_buffer_size;
81
82 /**
83 * Packets split by the parser get queued here.
84 */
85 PacketList parse_queue;
86
87 /**
88 * Contexts and child contexts do not contain a metadata option
89 */
90 int metafree;
91
92 /**
93 * Set if chapter ids are strictly monotonic.
94 */
95 int chapter_ids_monotonic;
96 };
66 };97 };
67 98
68#if FF_API_LAVF_SHORTEST99#if FF_API_LAVF_SHORTEST
libavformat/demux.c+40−32
@@ -216,6 +216,7 @@ static int update_stream_avctx(AVFormatContext *s) · 215 unmodified lines
216int avformat_open_input(AVFormatContext **ps, const char *filename,216int avformat_open_input(AVFormatContext **ps, const char *filename,
217 const AVInputFormat *fmt, AVDictionary **options)217 const AVInputFormat *fmt, AVDictionary **options)
218{218{
219 FormatContextInternal *fci;
219 AVFormatContext *s = *ps;220 AVFormatContext *s = *ps;
220 FFFormatContext *si;221 FFFormatContext *si;
221 AVDictionary *tmp = NULL;222 AVDictionary *tmp = NULL;
@@ -224,7 +225,8 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, · 2 unmodified lines
224 225
225 if (!s && !(s = avformat_alloc_context()))226 if (!s && !(s = avformat_alloc_context()))
226 return AVERROR(ENOMEM);227 return AVERROR(ENOMEM);
227 si = ffformatcontext(s);228 fci = ff_fc_internal(s);
229 si = &fci->fc;
228 if (!s->av_class) {230 if (!s->av_class) {
229 av_log(NULL, AV_LOG_ERROR, "Input context has not been properly allocated by avformat_alloc_context() and is not NULL either\n");231 av_log(NULL, AV_LOG_ERROR, "Input context has not been properly allocated by avformat_alloc_context() and is not NULL either\n");
230 return AVERROR(EINVAL);232 return AVERROR(EINVAL);
@@ -337,7 +339,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, · 106 unmodified lines
337 if (s->pb && !si->data_offset)339 if (s->pb && !si->data_offset)
338 si->data_offset = avio_tell(s->pb);340 si->data_offset = avio_tell(s->pb);
339 341
340 si->raw_packet_buffer_size = 0;342 fci->raw_packet_buffer_size = 0;
341 343
342 update_stream_avctx(s);344 update_stream_avctx(s);
343 345
@@ -411,7 +413,7 @@ static void force_codec_ids(AVFormatContext *s, AVStream *st) · 67 unmodified lines
411 413
412static int probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)414static int probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
413{415{
414 FFFormatContext *const si = ffformatcontext(s);416 FormatContextInternal *const fci = ff_fc_internal(s);
415 FFStream *const sti = ffstream(st);417 FFStream *const sti = ffstream(st);
416 418
417 if (sti->request_probe > 0) {419 if (sti->request_probe > 0) {
@@ -441,8 +443,8 @@ no_packet: · 23 unmodified lines
441 }443 }
442 }444 }
443 445
444 end = si->raw_packet_buffer_size >= s->probesize446 end = fci->raw_packet_buffer_size >= s->probesize ||
445 || sti->probe_packets <= 0;447 sti->probe_packets <= 0;
446 448
447 if (end || av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {449 if (end || av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
448 int score = set_codec_from_probe_data(s, st, pd);450 int score = set_codec_from_probe_data(s, st, pd);
@@ -564,7 +566,7 @@ static void update_timestamps(AVFormatContext *s, AVStream *st, AVPacket *pkt) · 115 unmodified lines
564 */566 */
565static int handle_new_packet(AVFormatContext *s, AVPacket *pkt, int allow_passthrough)567static int handle_new_packet(AVFormatContext *s, AVPacket *pkt, int allow_passthrough)
566{568{
567 FFFormatContext *const si = ffformatcontext(s);569 FormatContextInternal *const fci = ff_fc_internal(s);
568 AVStream *st;570 AVStream *st;
569 FFStream *sti;571 FFStream *sti;
570 int err;572 int err;
@@ -588,17 +590,17 @@ static int handle_new_packet(AVFormatContext *s, AVPacket *pkt, int allow_passth · 17 unmodified lines
588 590
589 update_timestamps(s, st, pkt);591 update_timestamps(s, st, pkt);
590 592
591 if (sti->request_probe <= 0 && allow_passthrough && !si->raw_packet_buffer.head)593 if (sti->request_probe <= 0 && allow_passthrough && !fci->raw_packet_buffer.head)
592 return 0;594 return 0;
593 595
594 err = avpriv_packet_list_put(&si->raw_packet_buffer, pkt, NULL, 0);596 err = avpriv_packet_list_put(&fci->raw_packet_buffer, pkt, NULL, 0);
595 if (err < 0) {597 if (err < 0) {
596 av_packet_unref(pkt);598 av_packet_unref(pkt);
597 return err;599 return err;
598 }600 }
599 601
600 pkt = &si->raw_packet_buffer.tail->pkt;602 pkt = &fci->raw_packet_buffer.tail->pkt;
601 si->raw_packet_buffer_size += pkt->size;603 fci->raw_packet_buffer_size += pkt->size;
602 604
603 err = probe_codec(s, st, pkt);605 err = probe_codec(s, st, pkt);
604 if (err < 0)606 if (err < 0)
@@ -616,7 +618,7 @@ int ff_buffer_packet(AVFormatContext *s, AVPacket *pkt) · 11 unmodified lines
616 618
617int ff_read_packet(AVFormatContext *s, AVPacket *pkt)619int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
618{620{
619 FFFormatContext *const si = ffformatcontext(s);621 FormatContextInternal *const fci = ff_fc_internal(s);
620 int err;622 int err;
621 623
622#if FF_API_INIT_PACKET624#if FF_API_INIT_PACKET
@@ -630,16 +632,16 @@ FF_ENABLE_DEPRECATION_WARNINGS · 7 unmodified lines
630#endif632#endif
631 633
632 for (;;) {634 for (;;) {
633 PacketListEntry *pktl = si->raw_packet_buffer.head;635 PacketListEntry *pktl = fci->raw_packet_buffer.head;
634 636
635 if (pktl) {637 if (pktl) {
636 AVStream *const st = s->streams[pktl->pkt.stream_index];638 AVStream *const st = s->streams[pktl->pkt.stream_index];
637 if (si->raw_packet_buffer_size >= s->probesize)639 if (fci->raw_packet_buffer_size >= s->probesize)
638 if ((err = probe_codec(s, st, NULL)) < 0)640 if ((err = probe_codec(s, st, NULL)) < 0)
639 return err;641 return err;
640 if (ffstream(st)->request_probe <= 0) {642 if (ffstream(st)->request_probe <= 0) {
641 avpriv_packet_list_get(&si->raw_packet_buffer, pkt);643 avpriv_packet_list_get(&fci->raw_packet_buffer, pkt);
642 si->raw_packet_buffer_size -= pkt->size;644 fci->raw_packet_buffer_size -= pkt->size;
643 return 0;645 return 0;
644 }646 }
645 }647 }
@@ -766,11 +768,12 @@ static int has_decode_delay_been_guessed(AVStream *st) · 120 unmodified lines
766static PacketListEntry *get_next_pkt(AVFormatContext *s, AVStream *st,768static PacketListEntry *get_next_pkt(AVFormatContext *s, AVStream *st,
767 PacketListEntry *pktl)769 PacketListEntry *pktl)
768{770{
769 FFFormatContext *const si = ffformatcontext(s);771 FormatContextInternal *const fci = ff_fc_internal(s);
772 FFFormatContext *const si = &fci->fc;
770 if (pktl->next)773 if (pktl->next)
771 return pktl->next;774 return pktl->next;
772 if (pktl == si->packet_buffer.tail)775 if (pktl == si->packet_buffer.tail)
773 return si->parse_queue.head;776 return fci->parse_queue.head;
774 return NULL;777 return NULL;
775}778}
776 779
@@ -850,10 +853,11 @@ static void update_dts_from_pts(AVFormatContext *s, int stream_index, · 73 unmodified lines
850static void update_initial_timestamps(AVFormatContext *s, int stream_index,853static void update_initial_timestamps(AVFormatContext *s, int stream_index,
851 int64_t dts, int64_t pts, AVPacket *pkt)854 int64_t dts, int64_t pts, AVPacket *pkt)
852{855{
853 FFFormatContext *const si = ffformatcontext(s);856 FormatContextInternal *const fci = ff_fc_internal(s);
857 FFFormatContext *const si = &fci->fc;
854 AVStream *const st = s->streams[stream_index];858 AVStream *const st = s->streams[stream_index];
855 FFStream *const sti = ffstream(st);859 FFStream *const sti = ffstream(st);
856 PacketListEntry *pktl = si->packet_buffer.head ? si->packet_buffer.head : si->parse_queue.head;860 PacketListEntry *pktl = si->packet_buffer.head ? si->packet_buffer.head : fci->parse_queue.head;
857 861
858 uint64_t shift;862 uint64_t shift;
859 863
@@ -903,9 +907,10 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, · 43 unmodified lines
903static void update_initial_durations(AVFormatContext *s, AVStream *st,907static void update_initial_durations(AVFormatContext *s, AVStream *st,
904 int stream_index, int64_t duration)908 int stream_index, int64_t duration)
905{909{
906 FFFormatContext *const si = ffformatcontext(s);910 FormatContextInternal *const fci = ff_fc_internal(s);
911 FFFormatContext *const si = &fci->fc;
907 FFStream *const sti = ffstream(st);912 FFStream *const sti = ffstream(st);
908 PacketListEntry *pktl = si->packet_buffer.head ? si->packet_buffer.head : si->parse_queue.head;913 PacketListEntry *pktl = si->packet_buffer.head ? si->packet_buffer.head : fci->parse_queue.head;
909 int64_t cur_dts = RELATIVE_TS_BASE;914 int64_t cur_dts = RELATIVE_TS_BASE;
910 915
911 if (sti->first_dts != AV_NOPTS_VALUE) {916 if (sti->first_dts != AV_NOPTS_VALUE) {
@@ -931,7 +936,7 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st, · 19 unmodified lines
931 av_log(s, AV_LOG_DEBUG, "first_dts %s but no packet with dts in the queue\n", av_ts2str(sti->first_dts));936 av_log(s, AV_LOG_DEBUG, "first_dts %s but no packet with dts in the queue\n", av_ts2str(sti->first_dts));
932 return;937 return;
933 }938 }
934 pktl = si->packet_buffer.head ? si->packet_buffer.head : si->parse_queue.head;939 pktl = si->packet_buffer.head ? si->packet_buffer.head : fci->parse_queue.head;
935 sti->first_dts = cur_dts;940 sti->first_dts = cur_dts;
936 } else if (sti->cur_dts != RELATIVE_TS_BASE)941 } else if (sti->cur_dts != RELATIVE_TS_BASE)
937 return;942 return;
@@ -963,7 +968,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 25 unmodified lines
963 AVCodecParserContext *pc, AVPacket *pkt,968 AVCodecParserContext *pc, AVPacket *pkt,
964 int64_t next_dts, int64_t next_pts)969 int64_t next_dts, int64_t next_pts)
965{970{
966 FFFormatContext *const si = ffformatcontext(s);971 FormatContextInternal *const fci = ff_fc_internal(s);
972 FFFormatContext *const si = &fci->fc;
967 FFStream *const sti = ffstream(st);973 FFStream *const sti = ffstream(st);
968 int num, den, presentation_delayed, delay;974 int num, den, presentation_delayed, delay;
969 int64_t offset;975 int64_t offset;
@@ -1048,7 +1054,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 78 unmodified lines
1048 }1054 }
1049 }1055 }
1050 1056
1051 if (pkt->duration > 0 && (si->packet_buffer.head || si->parse_queue.head))1057 if (pkt->duration > 0 && (si->packet_buffer.head || fci->parse_queue.head))
1052 update_initial_durations(s, st, pkt->stream_index, pkt->duration);1058 update_initial_durations(s, st, pkt->stream_index, pkt->duration);
1053 1059
1054 /* Correct timestamps with byte offset if demuxers only have timestamps1060 /* Correct timestamps with byte offset if demuxers only have timestamps
@@ -1156,7 +1162,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 101 unmodified lines
1156static int parse_packet(AVFormatContext *s, AVPacket *pkt,1162static int parse_packet(AVFormatContext *s, AVPacket *pkt,
1157 int stream_index, int flush)1163 int stream_index, int flush)
1158{1164{
1159 FFFormatContext *const si = ffformatcontext(s);1165 FormatContextInternal *const fci = ff_fc_internal(s);
1166 FFFormatContext *const si = &fci->fc;
1160 AVPacket *out_pkt = si->parse_pkt;1167 AVPacket *out_pkt = si->parse_pkt;
1161 AVStream *st = s->streams[stream_index];1168 AVStream *st = s->streams[stream_index];
1162 FFStream *const sti = ffstream(st);1169 FFStream *const sti = ffstream(st);
@@ -1249,7 +1256,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, · 86 unmodified lines
1249 1256
1250 compute_pkt_fields(s, st, sti->parser, out_pkt, next_dts, next_pts);1257 compute_pkt_fields(s, st, sti->parser, out_pkt, next_dts, next_pts);
1251 1258
1252 ret = avpriv_packet_list_put(&si->parse_queue,1259 ret = avpriv_packet_list_put(&fci->parse_queue,
1253 out_pkt, NULL, 0);1260 out_pkt, NULL, 0);
1254 if (ret < 0)1261 if (ret < 0)
1255 goto fail;1262 goto fail;
@@ -1324,11 +1331,12 @@ static int extract_extradata(FFFormatContext *si, AVStream *st, const AVPacket * · 68 unmodified lines
1324 1331
1325static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)1332static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
1326{1333{
1327 FFFormatContext *const si = ffformatcontext(s);1334 FormatContextInternal *const fci = ff_fc_internal(s);
1335 FFFormatContext *const si = &fci->fc;
1328 int ret, got_packet = 0;1336 int ret, got_packet = 0;
1329 AVDictionary *metadata = NULL;1337 AVDictionary *metadata = NULL;
1330 1338
1331 while (!got_packet && !si->parse_queue.head) {1339 while (!got_packet && !fci->parse_queue.head) {
1332 AVStream *st;1340 AVStream *st;
1333 FFStream *sti;1341 FFStream *sti;
1334 1342
@@ -1456,8 +1464,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) · 121 unmodified lines
1456 }1464 }
1457 }1465 }
1458 1466
1459 if (!got_packet && si->parse_queue.head)1467 if (!got_packet && fci->parse_queue.head)
1460 ret = avpriv_packet_list_get(&si->parse_queue, pkt);1468 ret = avpriv_packet_list_get(&fci->parse_queue, pkt);
1461 1469
1462 if (ret >= 0) {1470 if (ret >= 0) {
1463 AVStream *const st = s->streams[pkt->stream_index];1471 AVStream *const st = s->streams[pkt->stream_index];
@@ -1508,7 +1516,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) · 44 unmodified lines
1508#endif1516#endif
1509 }1517 }
1510 1518
1511 if (!si->metafree) {1519 if (!fci->metafree) {
1512 int metaret = av_opt_get_dict_val(s, "metadata", AV_OPT_SEARCH_CHILDREN, &metadata);1520 int metaret = av_opt_get_dict_val(s, "metadata", AV_OPT_SEARCH_CHILDREN, &metadata);
1513 if (metadata) {1521 if (metadata) {
1514 s->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED;1522 s->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED;
@@ -1516,7 +1524,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) · 1 unmodified line
1516 av_dict_free(&metadata);1524 av_dict_free(&metadata);
1517 av_opt_set_dict_val(s, "metadata", NULL, AV_OPT_SEARCH_CHILDREN);1525 av_opt_set_dict_val(s, "metadata", NULL, AV_OPT_SEARCH_CHILDREN);
1518 }1526 }
1519 si->metafree = metaret == AVERROR_OPTION_NOT_FOUND;1527 fci->metafree = metaret == AVERROR_OPTION_NOT_FOUND;
1520 }1528 }
1521 1529
1522 if (s->debug & FF_FDEBUG_TS)1530 if (s->debug & FF_FDEBUG_TS)
libavformat/demux_utils.c+7−6
@@ -25,6 +25,7 @@ · 24 unmodified lines
25#include "libavcodec/bytestream.h"25#include "libavcodec/bytestream.h"
26#include "libavcodec/packet_internal.h"26#include "libavcodec/packet_internal.h"
27#include "avformat.h"27#include "avformat.h"
28#include "avformat_internal.h"
28#include "avio_internal.h"29#include "avio_internal.h"
29#include "demux.h"30#include "demux.h"
30#include "internal.h"31#include "internal.h"
@@ -42,7 +43,7 @@ void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type) · 11 unmodified lines
42AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,43AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
43 int64_t start, int64_t end, const char *title)44 int64_t start, int64_t end, const char *title)
44{45{
45 FFFormatContext *const si = ffformatcontext(s);46 FormatContextInternal *const fci = ff_fc_internal(s);
46 AVChapter *chapter = NULL;47 AVChapter *chapter = NULL;
47 int ret;48 int ret;
48 49
@@ -52,13 +53,13 @@ AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_ba · 3 unmodified lines
52 }53 }
53 54
54 if (!s->nb_chapters) {55 if (!s->nb_chapters) {
55 si->chapter_ids_monotonic = 1;56 fci->chapter_ids_monotonic = 1;
56 } else if (!si->chapter_ids_monotonic || s->chapters[s->nb_chapters-1]->id >= id) {57 } else if (!fci->chapter_ids_monotonic || s->chapters[s->nb_chapters-1]->id >= id) {
57 for (unsigned i = 0; i < s->nb_chapters; i++)58 for (unsigned i = 0; i < s->nb_chapters; i++)
58 if (s->chapters[i]->id == id)59 if (s->chapters[i]->id == id)
59 chapter = s->chapters[i];60 chapter = s->chapters[i];
60 if (!chapter)61 if (!chapter)
61 si->chapter_ids_monotonic = 0;62 fci->chapter_ids_monotonic = 0;
62 }63 }
63 64
64 if (!chapter) {65 if (!chapter) {
@@ -92,7 +93,7 @@ void av_format_inject_global_side_data(AVFormatContext *s) · 27 unmodified lines
92 93
93int avformat_queue_attached_pictures(AVFormatContext *s)94int avformat_queue_attached_pictures(AVFormatContext *s)
94{95{
95 FFFormatContext *const si = ffformatcontext(s);96 FormatContextInternal *const fci = ff_fc_internal(s);
96 int ret;97 int ret;
97 for (unsigned i = 0; i < s->nb_streams; i++)98 for (unsigned i = 0; i < s->nb_streams; i++)
98 if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC &&99 if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC &&
@@ -104,7 +105,7 @@ int avformat_queue_attached_pictures(AVFormatContext *s) · 5 unmodified lines
104 continue;105 continue;
105 }106 }
106 107
107 ret = avpriv_packet_list_put(&si->raw_packet_buffer,108 ret = avpriv_packet_list_put(&fci->raw_packet_buffer,
108 &s->streams[i]->attached_pic,109 &s->streams[i]->attached_pic,
109 av_packet_ref, 0);110 av_packet_ref, 0);
110 if (ret < 0)111 if (ret < 0)
libavformat/internal.h+0−25
@@ -88,17 +88,6 @@ typedef struct FFFormatContext { · 87 unmodified lines
88 /* av_seek_frame() support */88 /* av_seek_frame() support */
89 int64_t data_offset; /**< offset of the first packet */89 int64_t data_offset; /**< offset of the first packet */
90 90
91 /**
92 * Raw packets from the demuxer, prior to parsing and decoding.
93 * This buffer is used for buffering packets until the codec can
94 * be identified, as parsing cannot be done without knowing the
95 * codec.
96 */
97 PacketList raw_packet_buffer;
98 /**
99 * Packets split by the parser get queued here.
100 */
101 PacketList parse_queue;
102 /**91 /**
103 * The generic code uses this as a temporary packet92 * The generic code uses this as a temporary packet
104 * to parse packets or for muxing, especially flushing.93 * to parse packets or for muxing, especially flushing.
@@ -120,10 +109,6 @@ typedef struct FFFormatContext { · 15 unmodified lines
120 * permanent ones).109 * permanent ones).
121 */110 */
122 AVPacket *pkt;111 AVPacket *pkt;
123 /**
124 * Sum of the size of packets in raw_packet_buffer, in bytes.
125 */
126 int raw_packet_buffer_size;
127 112
128#if FF_API_AVSTREAM_SIDE_DATA113#if FF_API_AVSTREAM_SIDE_DATA
129 int inject_global_side_data;114 int inject_global_side_data;
@@ -140,16 +125,6 @@ typedef struct FFFormatContext { · 10 unmodified lines
140 * Prefer the codec framerate for avg_frame_rate computation.125 * Prefer the codec framerate for avg_frame_rate computation.
141 */126 */
142 int prefer_codec_framerate;127 int prefer_codec_framerate;
143
144 /**
145 * Set if chapter ids are strictly monotonic.
146 */
147 int chapter_ids_monotonic;
148
149 /**
150 * Contexts and child contexts do not contain a metadata option
151 */
152 int metafree;
153} FFFormatContext;128} FFFormatContext;
154 129
155static av_always_inline FFFormatContext *ffformatcontext(AVFormatContext *s)130static av_always_inline FFFormatContext *ffformatcontext(AVFormatContext *s)

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