by opening a GetBitContext on its data when all the info one cares about
is actually in the first byte of data.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>
---
 libavcodec/vp9_superframe_bsf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
index a7faad3abf..29d1c759c7 100644
--- a/libavcodec/vp9_superframe_bsf.c
+++ b/libavcodec/vp9_superframe_bsf.c
@@ -135,8 +135,7 @@ static int vp9_superframe_filter(AVBSFContext *ctx, 
AVPacket *pkt)
         uses_superframe_syntax = pkt->size >= idx_sz && pkt->data[pkt->size - 
idx_sz] == marker;
     }
 
-    if ((res = init_get_bits8(&gb, pkt->data, pkt->size)) < 0)
-        goto done;
+    init_get_bits(&gb, pkt->data, 8);
 
     get_bits(&gb, 2); // frame marker
     profile  = get_bits1(&gb);
-- 
2.20.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-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to