[FFmpeg-cvslog] avformat/fitsdec: stop creating pts, instead set packet duration
Paul B Mahol
git at videolan.org
Sun May 21 22:06:06 EEST 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun May 21 20:55:32 2023 +0200| [02823703f4753e10e7de14124d003d3fc23d7f39] | committer: Paul B Mahol
avformat/fitsdec: stop creating pts, instead set packet duration
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02823703f4753e10e7de14124d003d3fc23d7f39
---
libavformat/fitsdec.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/libavformat/fitsdec.c b/libavformat/fitsdec.c
index 8618b9aab0..516579669f 100644
--- a/libavformat/fitsdec.c
+++ b/libavformat/fitsdec.c
@@ -37,7 +37,6 @@ typedef struct FITSContext {
const AVClass *class;
AVRational framerate;
int first_image;
- int64_t pts;
} FITSContext;
static int fits_probe(const AVProbeData *p)
@@ -61,7 +60,6 @@ static int fits_read_header(AVFormatContext *s)
st->codecpar->codec_id = AV_CODEC_ID_FITS;
avpriv_set_pts_info(st, 64, fits->framerate.den, fits->framerate.num);
- fits->pts = 0;
fits->first_image = 1;
return 0;
}
@@ -196,13 +194,11 @@ static int fits_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->size = avbuf.len - 80;
av_freep(&buf);
ret = avio_read(s->pb, pkt->data + pkt->size, size);
- if (ret < 0) {
+ if (ret < 0)
return ret;
- }
pkt->size += ret;
- pkt->pts = fits->pts;
- fits->pts++;
+ pkt->duration = 1;
return 0;
More information about the ffmpeg-cvslog
mailing list