Message ID | 20210305125419.504-2-jamrial@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,1/3] avcodec/codec: remove outdated comment about AVCodec.encode2() | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
James Almer: > This field hasn't been used to return the output frame size since > avcodec_decode_audio3() was removed. If I read 0eea212943544d40f99b05571aa7159d78667154 correctly, then the semantics changed with the addition of avcodec_decode_audio4() and not the removal of avcodec_decode_audio3(); (but there seemed to be some leftovers after that commit). > > Signed-off-by: James Almer <jamrial@gmail.com> > --- > libavcodec/codec.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/codec.h b/libavcodec/codec.h > index 3d7a1f4c26..bcda061da1 100644 > --- a/libavcodec/codec.h > +++ b/libavcodec/codec.h > @@ -281,7 +281,8 @@ typedef struct AVCodec { > */ > int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt, > const struct AVFrame *frame, int *got_packet_ptr); > - int (*decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt); > + int (*decode)(struct AVCodecContext *, void *outdata, int *got_frame_ptr, > + struct AVPacket *avpkt); I initially wanted to ask you to split the line after outdata to make this more balanced, but given that you need to add avctx anyway you have to do it anyway. > int (*close)(struct AVCodecContext *); > /** > * Encode API with decoupled frame/packet dataflow. This function is called >
On 3/7/2021 10:43 AM, Andreas Rheinhardt wrote: > James Almer: >> This field hasn't been used to return the output frame size since >> avcodec_decode_audio3() was removed. > > If I read 0eea212943544d40f99b05571aa7159d78667154 correctly, then the > semantics changed with the addition of avcodec_decode_audio4() and not > the removal of avcodec_decode_audio3(); (but there seemed to be some > leftovers after that commit). You're right. Fixed. > >> >> Signed-off-by: James Almer <jamrial@gmail.com> >> --- >> libavcodec/codec.h | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libavcodec/codec.h b/libavcodec/codec.h >> index 3d7a1f4c26..bcda061da1 100644 >> --- a/libavcodec/codec.h >> +++ b/libavcodec/codec.h >> @@ -281,7 +281,8 @@ typedef struct AVCodec { >> */ >> int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt, >> const struct AVFrame *frame, int *got_packet_ptr); >> - int (*decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt); >> + int (*decode)(struct AVCodecContext *, void *outdata, int *got_frame_ptr, >> + struct AVPacket *avpkt); > > I initially wanted to ask you to split the line after outdata to make > this more balanced, but given that you need to add avctx anyway you have > to do it anyway. Will do and push. Thanks. > >> int (*close)(struct AVCodecContext *); >> /** >> * Encode API with decoupled frame/packet dataflow. This function is called >> > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". >
diff --git a/libavcodec/codec.h b/libavcodec/codec.h index 3d7a1f4c26..bcda061da1 100644 --- a/libavcodec/codec.h +++ b/libavcodec/codec.h @@ -281,7 +281,8 @@ typedef struct AVCodec { */ int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt, const struct AVFrame *frame, int *got_packet_ptr); - int (*decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt); + int (*decode)(struct AVCodecContext *, void *outdata, int *got_frame_ptr, + struct AVPacket *avpkt); int (*close)(struct AVCodecContext *); /** * Encode API with decoupled frame/packet dataflow. This function is called
This field hasn't been used to return the output frame size since avcodec_decode_audio3() was removed. Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/codec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)