You've already forked FFmpeg
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:
@ -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");
|
av_log(h->c.avctx, AV_LOG_ERROR, "Bad picture format\n");
|
||||||
return AVERROR_INVALIDDATA;
|
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 */
|
h->c.picture_number = get_bits(&h->gb, 8); /* picture timestamp */
|
||||||
format = get_bits(&h->gb, 3);
|
format = get_bits(&h->gb, 3);
|
||||||
switch (format) {
|
switch (format) {
|
||||||
@ -101,7 +101,7 @@ int ff_flv_decode_picture_header(H263DecContext *const h)
|
|||||||
if (h->c.avctx->debug & FF_DEBUG_PICT_INFO) {
|
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",
|
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.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;
|
return 0;
|
||||||
|
@ -155,7 +155,6 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
|
|||||||
#endif
|
#endif
|
||||||
#if CONFIG_FLV_DECODER
|
#if CONFIG_FLV_DECODER
|
||||||
case AV_CODEC_ID_FLV1:
|
case AV_CODEC_ID_FLV1:
|
||||||
s->h263_flv = 1;
|
|
||||||
h->decode_header = ff_flv_decode_picture_header;
|
h->decode_header = ff_flv_decode_picture_header;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -598,7 +598,7 @@ retry:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* escape */
|
/* 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);
|
int is11 = SHOW_UBITS(re, &h->gb, 1);
|
||||||
SKIP_CACHE(re, &h->gb, 1);
|
SKIP_CACHE(re, &h->gb, 1);
|
||||||
run = SHOW_UBITS(re, &h->gb, 7) + 1;
|
run = SHOW_UBITS(re, &h->gb, 7) + 1;
|
||||||
|
Reference in New Issue
Block a user