On Mon, 1 Feb 2021, James Almer wrote:

Signed-off-by: James Almer <jamr...@gmail.com>
---
fftools/ffplay.c | 222 ++++++++++++++++++++++++++++-------------------
1 file changed, 135 insertions(+), 87 deletions(-)

diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 9ff0425163..ef954772ed 100644

[...]

-static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
+static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVPacket *pkt, 
AVSubtitle *sub) {
    int ret = AVERROR(EAGAIN);

    for (;;) {
-        AVPacket pkt;
-

This pkt should be kept local, because there is no need for it to be a parameter of decoder_decode_frame. So I suggest you add a new Decoder attribure tmp_pkt, and initialize pkt with it:

AVPacket *pkt = d->tmp_pkt;

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to