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/9] avformat/evcdec: ensure there are enough bytes to seekback
@ 2023-06-20 14:40 James Almer
  2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 2/9] avformat/evcdec: remove unnecessary av_packet_unref() calls James Almer
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: James Almer @ 2023-06-20 14:40 UTC (permalink / raw)
  To: ffmpeg-devel

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/evcdec.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/evcdec.c b/libavformat/evcdec.c
index 890babd3cb..9c4969e78f 100644
--- a/libavformat/evcdec.c
+++ b/libavformat/evcdec.c
@@ -30,6 +30,7 @@
 
 #include "rawdec.h"
 #include "avformat.h"
+#include "avio_internal.h"
 #include "internal.h"
 
 
@@ -192,8 +193,12 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt)
     }
 
     while(!au_end_found) {
-
         uint8_t buf[EVC_NALU_LENGTH_PREFIX_SIZE];
+
+        ret = ffio_ensure_seekback(s->pb, EVC_NALU_LENGTH_PREFIX_SIZE);
+        if (ret < 0)
+            return ret;
+
         ret = avio_read(s->pb, (unsigned char *)&buf, EVC_NALU_LENGTH_PREFIX_SIZE);
         if (ret < 0) {
             av_packet_unref(pkt);
-- 
2.41.0

_______________________________________________
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] 10+ messages in thread

end of thread, other threads:[~2023-06-21 16:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20 14:40 [FFmpeg-devel] [PATCH 1/9] avformat/evcdec: ensure there are enough bytes to seekback James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 2/9] avformat/evcdec: remove unnecessary av_packet_unref() calls James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 3/9] avformat/evcdec: flush the bsf on EOF James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 4/9] avformat/evcdec: use an unsigned type for nalu_size James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 5/9] avcodec/evc_ps: pass a GetBitContext to the SPS and PPS parsing functions James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 6/9] avcodec/evc_parse: pass a GetBitContext to the slice header parsing function James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 7/9] avcodec/evc_frame_merge: use a GetBitContext to parse entire NALUs James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 8/9] avcodec/evc_parser: " James Almer
2023-06-20 14:40 ` [FFmpeg-devel] [PATCH 9/9] avformat/evc: move NALU length and type parsing functions to a header James Almer
2023-06-21 16:31 ` [FFmpeg-devel] [PATCH 1/9] avformat/evcdec: ensure there are enough bytes to seekback 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