Skip to content

Commit

Permalink
更新flushcache
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed Dec 31, 2024
1 parent f7e9c4c commit cd1e222
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ijkmedia/ijkplayer/ff_ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ static void packet_queue_flush_videocache(PacketQueue *q)
#ifdef FFP_MERGE
av_freep(&pkt);
#else
pkt->next = q->recycle_pkt;
q->recycle_pkt = pkt;
// pkt->next = q->recycle_pkt;
// q->recycle_pkt = pkt;
#endif
}
// q->last_pkt = NULL;
Expand Down Expand Up @@ -600,6 +600,9 @@ static int convert_image(FFPlayer *ffp, AVFrame *src_frame, int64_t src_frame_pt
static int decoder_decode_frame(FFPlayer *ffp, Decoder *d, AVFrame *frame, AVSubtitle *sub) {
int ret = AVERROR(EAGAIN);

// 这里没有 AV_FRAME_DATA_SEI,可能需要使用其他标识符
// AVFrameSideData *sei_data_frame = av_frame_get_side_data(frame, AV_FRAME_DATA_NEW_EXTRADATA);

for (;;) {
AVPacket pkt;

Expand Down Expand Up @@ -3746,6 +3749,7 @@ static int read_thread(void *arg)
// }

if (ic->iformat->name != NULL && strcmp(ic->iformat->name, "flv") == 0 && is->video_st && is->video_st->codecpar) {
// AVPacketSideData *sei_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, NULL);
AVCodecParameters *in_codecpar = is->video_st->codecpar;
// if (in_codecpar->codec_type == AVMEDIA_TYPE_VIDEO && in_codecpar->codec_id == AV_CODEC_ID_H264) {
if (pkt->stream_index == is->video_stream) {
Expand Down

0 comments on commit cd1e222

Please sign in to comment.