Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/5] avcodec/binkaudio: clear pts when returning more than one frame per input packet
@ 2022-12-04 21:52 James Almer
  2022-12-04 21:52 ` [FFmpeg-devel] [PATCH 2/5] Revert "avcodec/decode: use a packet list to store packet properties" James Almer
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: James Almer @ 2022-12-04 21:52 UTC (permalink / raw)
  To: ffmpeg-devel

This will be needed for the following commit, after which ff_get_buffer() will
stop setting frame->pts to AV_NOPTS_VALUE.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/binkaudio.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 046bf93207..f28ecba760 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -296,9 +296,10 @@ static int binkaudio_receive_frame(AVCodecContext *avctx, AVFrame *frame)
 {
     BinkAudioContext *s = avctx->priv_data;
     GetBitContext *gb = &s->gb;
-    int ret;
+    int new_pkt, ret;
 
 again:
+    new_pkt = !s->pkt->data;
     if (!s->pkt->data) {
         ret = ff_decode_get_packet(avctx, s->pkt);
         if (ret < 0) {
@@ -325,6 +326,8 @@ again:
         frame->nb_samples = s->frame_len;
         if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
             return ret;
+        if (!new_pkt)
+            frame->pts = AV_NOPTS_VALUE;
     }
 
     if (decode_block(s, (float **)frame->extended_data,
-- 
2.38.1

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

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-12-12 11:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-04 21:52 [FFmpeg-devel] [PATCH 1/5] avcodec/binkaudio: clear pts when returning more than one frame per input packet James Almer
2022-12-04 21:52 ` [FFmpeg-devel] [PATCH 2/5] Revert "avcodec/decode: use a packet list to store packet properties" James Almer
2022-12-05 21:26   ` Michael Niedermayer
2022-12-06  0:03     ` [FFmpeg-devel] [PATCH 2/6] avcodec/wmadec: clear pts when returning a frame during flush James Almer
2022-12-06  8:27       ` Paul B Mahol
2022-12-06 11:42         ` James Almer
2022-12-04 21:52 ` [FFmpeg-devel] [PATCH 3/5] avcodec/decode: don't set last_pkt_props->size James Almer
2022-12-04 21:52 ` [FFmpeg-devel] [PATCH 4/5] avcodec/pthread_frame.c: keep the last_pkt_props from worker threads in sync with the user context James Almer
2022-12-04 21:52 ` [FFmpeg-devel] [PATCH 5/5] avcodec/mpeg4videodec: duplicate the last decoded frame when the last coded frame was skipped James Almer
2022-12-06  9:17   ` Andreas Rheinhardt
2022-12-06 11:21     ` James Almer
2022-12-12 11:37   ` James Almer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git