diff mbox series

[FFmpeg-devel,8/8] lavc/libvpxenc: drop FrameListData.duration

Message ID 20230228120104.2347-8-anton@khirnov.net
State Accepted
Commit ae95c87e64aa7ec29e0bad19016950171c3db3c6
Headers show
Series [FFmpeg-devel,1/8] lavu/frame: improve AVFrame.opaque[_ref] documentation | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Anton Khirnov Feb. 28, 2023, 12:01 p.m. UTC
It is write-only.
---
 libavcodec/libvpxenc.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

James Zern Feb. 28, 2023, 9:16 p.m. UTC | #1
On Tue, Feb 28, 2023 at 4:02 AM Anton Khirnov <anton@khirnov.net> wrote:
>
> It is write-only.
> ---
>  libavcodec/libvpxenc.c | 3 ---
>  1 file changed, 3 deletions(-)
>

libaomenc.c transfers this to AVPacket. You added this in:
  7cf161abe5 lavc/libaomenc: pass through frame durations to encoded packets
Should the same be done here?
Anton Khirnov March 1, 2023, 12:07 p.m. UTC | #2
Quoting James Zern (2023-02-28 22:16:39)
> On Tue, Feb 28, 2023 at 4:02 AM Anton Khirnov <anton@khirnov.net> wrote:
> >
> > It is write-only.
> > ---
> >  libavcodec/libvpxenc.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> 
> libaomenc.c transfers this to AVPacket. You added this in:
>   7cf161abe5 lavc/libaomenc: pass through frame durations to encoded packets
> Should the same be done here?

We could do that, but the duration types do not match (we use int64_t,
libvpx has unsigned long), which adds corner cases that need to be
handled. Since I need the machinery for opaque[_ref] anyway, might as
well use it for duration.
I'll do the same for aomenc when I get to implementing opaque
passthrough for it.
diff mbox series

Patch

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index aeeaa0e681..3d1abb7df9 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -58,8 +58,6 @@  struct FrameListData {
     size_t sz;                       /**< length of compressed data */
     int64_t pts;                     /**< time stamp to show frame
                                           (in timebase units) */
-    unsigned long duration;          /**< duration to show frame
-                                          (in timebase units) */
     uint32_t flags;                  /**< flags for this frame */
     uint64_t sse[4];
     int have_sse;                    /**< true if we have pending sse[] */
@@ -1295,7 +1293,6 @@  static inline void cx_pktcpy(struct FrameListData *dst,
                              VPxContext *ctx)
 {
     dst->pts      = src->data.frame.pts;
-    dst->duration = src->data.frame.duration;
     dst->flags    = src->data.frame.flags;
     dst->sz       = src->data.frame.sz;
     dst->buf      = src->data.frame.buf;