avformat/flvdec: remove unused context member of flv
The exheader is unnecessary after 207e9f4e505d969d6ff7545b449295a1b88d6d1c Iust use local varible can do the same function. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
176ed008bd
commit
ab88970fba
@ -80,7 +80,6 @@ typedef struct FLVContext {
|
|||||||
int64_t time_offset;
|
int64_t time_offset;
|
||||||
int64_t time_pos;
|
int64_t time_pos;
|
||||||
|
|
||||||
uint8_t exheader;
|
|
||||||
} FLVContext;
|
} FLVContext;
|
||||||
|
|
||||||
/* AMF date type */
|
/* AMF date type */
|
||||||
@ -813,7 +812,6 @@ static int flv_read_header(AVFormatContext *s)
|
|||||||
s->start_time = 0;
|
s->start_time = 0;
|
||||||
flv->sum_flv_tag_size = 0;
|
flv->sum_flv_tag_size = 0;
|
||||||
flv->last_keyframe_stream_index = -1;
|
flv->last_keyframe_stream_index = -1;
|
||||||
flv->exheader = 0;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1043,6 +1041,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
AVStream *st = NULL;
|
AVStream *st = NULL;
|
||||||
int last = -1;
|
int last = -1;
|
||||||
int orig_size;
|
int orig_size;
|
||||||
|
int enhanced_flv = 0;
|
||||||
uint32_t video_codec_id = 0;
|
uint32_t video_codec_id = 0;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
@ -1095,9 +1094,9 @@ retry:
|
|||||||
* Reference Enhancing FLV 2023-03-v1.0.0-B.8
|
* Reference Enhancing FLV 2023-03-v1.0.0-B.8
|
||||||
* https://github.com/veovera/enhanced-rtmp/blob/main/enhanced-rtmp-v1.pdf
|
* https://github.com/veovera/enhanced-rtmp/blob/main/enhanced-rtmp-v1.pdf
|
||||||
* */
|
* */
|
||||||
flv->exheader = (flags >> 7) & 1;
|
enhanced_flv = (flags >> 7) & 1;
|
||||||
size--;
|
size--;
|
||||||
if (flv->exheader) {
|
if (enhanced_flv) {
|
||||||
video_codec_id = avio_rb32(s->pb);
|
video_codec_id = avio_rb32(s->pb);
|
||||||
size -= 4;
|
size -= 4;
|
||||||
}
|
}
|
||||||
@ -1276,7 +1275,7 @@ retry_duration:
|
|||||||
st->codecpar->codec_id == AV_CODEC_ID_AV1 ||
|
st->codecpar->codec_id == AV_CODEC_ID_AV1 ||
|
||||||
st->codecpar->codec_id == AV_CODEC_ID_VP9) {
|
st->codecpar->codec_id == AV_CODEC_ID_VP9) {
|
||||||
int type = 0;
|
int type = 0;
|
||||||
if (flv->exheader && stream_type == FLV_STREAM_TYPE_VIDEO) {
|
if (enhanced_flv && stream_type == FLV_STREAM_TYPE_VIDEO) {
|
||||||
type = flags & 0x0F;
|
type = flags & 0x0F;
|
||||||
} else {
|
} else {
|
||||||
type = avio_r8(s->pb);
|
type = avio_r8(s->pb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user