You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: h264: error out on invalid bitdepth. aacsbr: use a swap index for the Y matrix rather than copy buffers. huffyuv: do not abort on unknown pix_fmt; instead, return an error. lcl: return negative error codes on decode_init() errors. rtpenc: Use MB info side data for splitting H263 packets for RFC 2190 h263enc: Add an option for outputting info about MBs as side data avpacket: Add a function for shrinking already allocated side data nellymoserdec: Saner and faster IMDCT windowing Conflicts: doc/APIchanges libavcodec/avpacket.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -279,3 +279,19 @@ int av_packet_split_side_data(AVPacket *pkt){
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
||||
int size)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pkt->side_data_elems; i++) {
|
||||
if (pkt->side_data[i].type == type) {
|
||||
if (size > pkt->side_data[i].size)
|
||||
return AVERROR(ENOMEM);
|
||||
pkt->side_data[i].size = size;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return AVERROR(ENOENT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user