1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/flvdec: Binarize h263_flv

It used to be a tri-state encoding both whether to use FLV picture
headers and whether to use the FLV way of encoding escape values,
but the former is now unnecessary due to the switch to a function
pointer for reading the header. So binarize h263_flv.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-06-22 11:02:47 +02:00
parent 532ae5dc7d
commit 00ea78f426
3 changed files with 3 additions and 4 deletions

View File

@ -40,7 +40,7 @@ int ff_flv_decode_picture_header(H263DecContext *const h)
av_log(h->c.avctx, AV_LOG_ERROR, "Bad picture format\n");
return AVERROR_INVALIDDATA;
}
h->c.h263_flv = format + 1;
h->c.h263_flv = format;
h->c.picture_number = get_bits(&h->gb, 8); /* picture timestamp */
format = get_bits(&h->gb, 3);
switch (format) {
@ -101,7 +101,7 @@ int ff_flv_decode_picture_header(H263DecContext *const h)
if (h->c.avctx->debug & FF_DEBUG_PICT_INFO) {
av_log(h->c.avctx, AV_LOG_DEBUG, "%c esc_type:%d, qp:%d num:%d\n",
h->c.droppable ? 'D' : av_get_picture_type_char(h->c.pict_type),
h->c.h263_flv - 1, h->c.qscale, h->c.picture_number);
h->c.h263_flv, h->c.qscale, h->c.picture_number);
}
return 0;

View File

@ -155,7 +155,6 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
#endif
#if CONFIG_FLV_DECODER
case AV_CODEC_ID_FLV1:
s->h263_flv = 1;
h->decode_header = ff_flv_decode_picture_header;
break;
#endif

View File

@ -598,7 +598,7 @@ retry:
return -1;
}
/* escape */
if (CONFIG_FLV_DECODER && h->c.h263_flv > 1) {
if (CONFIG_FLV_DECODER && h->c.h263_flv) {
int is11 = SHOW_UBITS(re, &h->gb, 1);
SKIP_CACHE(re, &h->gb, 1);
run = SHOW_UBITS(re, &h->gb, 7) + 1;