54 ctx->presentation_found =
ctx->pkt_flags = 0;
61 if (!
ctx->presentation_found)
63 ctx->presentation_found = 0;
64 src->flags |=
ctx->pkt_flags;
74 int ret,
size,
pos, display = 0, presentation = 0;
96 while (
i + 3 <= in->
size) {
97 uint8_t segment_type = in->
data[
i];
100 if (
i + segment_len > in->
size)
106 if (segment_len < 11)
108 ctx->presentation_found = presentation = 1;
124 if (!display &&
i != in->
size) {
165 if (!
ctx->in || !
ctx->buffer_pkt)
184 .p.name =
"pgs_frame_merge",
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static av_cold void close(AVCodecParserContext *s)
const FFBitStreamFilter ff_pgs_frame_merge_bsf
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
#define i(width, name, range_min, range_max)
void(* flush)(AVBSFContext *ctx)
int(* init)(AVBSFContext *ctx)
static struct @346255127015250356166251341105367306144006377143 state
AVCodecID
Identify the syntax and semantics of the bitstream.
@ AV_CODEC_ID_HDMV_PGS_SUBTITLE
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
Copy only "properties" fields from src to dst.
#define AVERROR_EOF
End of file.
#define AV_LOG_WARNING
Something somehow does not look correct.
Macro definitions for various function/variable attributes.
static enum AVCodecID frame_merge_codec_ids[]
static int frame_merge_filter(AVBSFContext *bsf, AVPacket *out)
static av_cold int frame_merge_init(AVBSFContext *bsf)
static av_cold void frame_merge_close(AVBSFContext *bsf)
@ END_DISPLAY_SET_SEGMENT
static int frame_merge_output(PGSMergeContext *ctx, AVPacket *dst, AVPacket *src)
static av_cold void frame_merge_flush(AVBSFContext *bsf)
The bitstream filter state.
void * priv_data
Opaque filter-specific private data.
This structure stores compressed data.
int flags
A combination of AV_PKT_FLAG values.
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
static AVFormatContext * ctx