You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/flvenc: fix shadowed variable ts
This commit is contained in:
@@ -993,12 +993,9 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
flv->videosize += (avio_tell(pb) - cur_offset);
|
flv->videosize += (avio_tell(pb) - cur_offset);
|
||||||
flv->lasttimestamp = pkt->dts / 1000.0;
|
flv->lasttimestamp = pkt->dts / 1000.0;
|
||||||
if (pkt->flags & AV_PKT_FLAG_KEY) {
|
if (pkt->flags & AV_PKT_FLAG_KEY) {
|
||||||
double ts = flv->lasttimestamp;
|
flv->lastkeyframetimestamp = flv->lasttimestamp;
|
||||||
int64_t pos = cur_offset;
|
flv->lastkeyframelocation = cur_offset;
|
||||||
|
ret = flv_append_keyframe_info(s, flv, flv->lasttimestamp, cur_offset);
|
||||||
flv->lastkeyframetimestamp = ts;
|
|
||||||
flv->lastkeyframelocation = pos;
|
|
||||||
ret = flv_append_keyframe_info(s, flv, ts, pos);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user