[FFmpeg-cvslog] avcodec/(dca|tta|pcm-bluray|pcm-dvd|wavpack)enc: Set pts+dur generically
Andreas Rheinhardt
git at videolan.org
Sat Aug 27 05:29:18 EEST 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Aug 24 00:33:40 2022 +0200| [7360e97e4beec13ef5aa87657490d8f272be9f26] | committer: Andreas Rheinhardt
avcodec/(dca|tta|pcm-bluray|pcm-dvd|wavpack)enc: Set pts+dur generically
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7360e97e4beec13ef5aa87657490d8f272be9f26
---
libavcodec/dcaenc.c | 4 ----
libavcodec/pcm-blurayenc.c | 3 ---
libavcodec/pcm-dvdenc.c | 3 ---
libavcodec/ttaenc.c | 3 ---
libavcodec/wavpackenc.c | 3 ---
5 files changed, 16 deletions(-)
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index 2481c4d3ec..6901e67860 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -39,8 +39,6 @@
#include "dcaenc.h"
#include "encode.h"
#include "fft.h"
-#include "internal.h"
-#include "mathops.h"
#include "put_bits.h"
#define MAX_CHANNELS 6
@@ -1215,8 +1213,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
flush_put_bits(&c->pb);
memset(put_bits_ptr(&c->pb), 0, put_bytes_left(&c->pb, 0));
- avpkt->pts = frame->pts;
- avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
*got_packet_ptr = 1;
return 0;
}
diff --git a/libavcodec/pcm-blurayenc.c b/libavcodec/pcm-blurayenc.c
index 6a5cdb2dcd..6543bc2213 100644
--- a/libavcodec/pcm-blurayenc.c
+++ b/libavcodec/pcm-blurayenc.c
@@ -23,7 +23,6 @@
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"
-#include "internal.h"
typedef struct BlurayPCMEncContext {
uint16_t header; // Header added to every frame
@@ -266,8 +265,6 @@ static int pcm_bluray_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
return AVERROR_BUG;
}
- avpkt->pts = frame->pts;
- avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
*got_packet_ptr = 1;
return 0;
diff --git a/libavcodec/pcm-dvdenc.c b/libavcodec/pcm-dvdenc.c
index a7023d148f..4bc635ab1f 100644
--- a/libavcodec/pcm-dvdenc.c
+++ b/libavcodec/pcm-dvdenc.c
@@ -24,7 +24,6 @@
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"
-#include "internal.h"
typedef struct PCMDVDContext {
uint8_t header[3]; // Header added to every frame
@@ -167,8 +166,6 @@ static int pcm_dvd_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
break;
}
- avpkt->pts = frame->pts;
- avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
*got_packet_ptr = 1;
return 0;
diff --git a/libavcodec/ttaenc.c b/libavcodec/ttaenc.c
index 25113d4a72..6a8c2b122d 100644
--- a/libavcodec/ttaenc.c
+++ b/libavcodec/ttaenc.c
@@ -25,7 +25,6 @@
#include "codec_internal.h"
#include "encode.h"
#include "put_bits.h"
-#include "internal.h"
#include "libavutil/crc.h"
typedef struct TTAEncContext {
@@ -188,9 +187,7 @@ pkt_alloc:
put_bits32(&pb, av_crc(s->crc_table, UINT32_MAX, avpkt->data, out_bytes) ^ UINT32_MAX);
flush_put_bits(&pb);
- avpkt->pts = frame->pts;
avpkt->size = out_bytes + 4;
- avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
*got_packet_ptr = 1;
return 0;
}
diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index 7f7ed804ee..07dfb22bbd 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -26,7 +26,6 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
-#include "internal.h"
#include "put_bits.h"
#include "bytestream.h"
#include "wavpackenc.h"
@@ -2905,9 +2904,7 @@ static int wavpack_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
s->sample_index += frame->nb_samples;
- avpkt->pts = frame->pts;
avpkt->size = buf - avpkt->data;
- avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
*got_packet_ptr = 1;
return 0;
}
More information about the ffmpeg-cvslog
mailing list