[FFmpeg-cvslog] lavc/avpacket: Make pkt parameter of av_packet_get_side_data() const.
Carl Eugen Hoyos
git at videolan.org
Thu Mar 16 22:09:48 EET 2017
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Feb 26 11:58:49 2017 +0100| [0d34dbc27277d65e58a675d91d810903a3e21fac] | committer: Carl Eugen Hoyos
lavc/avpacket: Make pkt parameter of av_packet_get_side_data() const.
Reflects the actual code and silences a gcc warning:
libavcodec/utils.c:2102:36: warning: passing argument 1 of 'av_packet_get_side_data' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d34dbc27277d65e58a675d91d810903a3e21fac
---
libavcodec/avcodec.h | 2 +-
libavcodec/avpacket.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index e32f579..1923c96 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4572,7 +4572,7 @@ int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
* @param size pointer for side information size to store (optional)
* @return pointer to data if present or NULL otherwise
*/
-uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
int *size);
int av_packet_merge_side_data(AVPacket *pkt);
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 60269aa..3ea2511 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -336,7 +336,7 @@ uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
return data;
}
-uint8_t *av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
+uint8_t *av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
int *size)
{
int i;
More information about the ffmpeg-cvslog
mailing list