X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Favienc.c;h=e05e02281d8edc3f5b86a140831ef20d3dc5d539;hb=ab6f4fd4a70aaef09b88fc183bb7247ebe0b859a;hp=c45bac28c4401a7e4741f396c0847db99152b8ee;hpb=ba650ea11825fdf7df479313bfca2a1003ffd90e;p=ffmpeg diff --git a/libavformat/avienc.c b/libavformat/avienc.c index c45bac28c44..e05e02281d8 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -70,7 +70,7 @@ typedef struct { AVIIndex indexes; } AVIStream; -static inline AVIIentry *avi_get_ientry(AVIIndex *idx, int ent_id) +static inline AVIIentry *avi_get_ientry(const AVIIndex *idx, int ent_id) { int cl = ent_id / AVI_INDEX_CLUSTER_SIZE; int id = ent_id % AVI_INDEX_CLUSTER_SIZE; @@ -576,7 +576,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) AVIStream *avist = s->streams[stream_index]->priv_data; AVCodecContext *enc = s->streams[stream_index]->codec; - if (enc->codec_id == AV_CODEC_ID_H264 && enc->codec_tag == MKTAG('H','2','6','4')) { + if (enc->codec_id == AV_CODEC_ID_H264 && enc->codec_tag == MKTAG('H','2','6','4') && pkt->size) { int ret = ff_check_h264_startcode(s, s->streams[stream_index], pkt); if (ret < 0) return ret;