Commit c060100ff3 for ffmpeg
commit c060100ff322a78b58ff109790a26cc674a3a09f
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Thu Oct 15 03:53:15 2026 +0200
ffplay: start the packet queue of a decoder when initializing it
This allows queuing the packets of a decoder before its thread starts.
Assisted-by: Claude
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 34fe21ba8c..fed54fe3ae 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -611,6 +611,7 @@ static int decoder_init(Decoder *d, AVCodecContext *avctx, PacketQueue *queue, S
d->empty_queue_cond = empty_queue_cond;
d->start_pts = AV_NOPTS_VALUE;
d->pkt_serial = -1;
+ packet_queue_start(d->queue);
return 0;
}
@@ -2320,7 +2321,6 @@ static int audio_thread(void *arg)
static int decoder_start(Decoder *d, int (*fn)(void *), const char *thread_name, void* arg)
{
- packet_queue_start(d->queue);
d->decoder_tid = SDL_CreateThread(fn, thread_name, arg);
if (!d->decoder_tid) {
av_log(NULL, AV_LOG_ERROR, "SDL_CreateThread(): %s\n", SDL_GetError());