avformat/avienc: Rename reshuffles return variable to ensure it is not mixed up

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/102/merge
Michael Niedermayer 9 years ago
parent defb960a47
commit ea88dc3e8e
  1. 14
      libavformat/avienc.c

@ -718,16 +718,17 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
AVIStream *avist = s->streams[stream_index]->priv_data; AVIStream *avist = s->streams[stream_index]->priv_data;
AVIOContext *pb = s->pb; AVIOContext *pb = s->pb;
AVPacket *opkt = pkt; AVPacket *opkt = pkt;
int reshuffle_ret;
if (par->codec_id == AV_CODEC_ID_RAWVIDEO && par->codec_tag == 0) { if (par->codec_id == AV_CODEC_ID_RAWVIDEO && par->codec_tag == 0) {
int64_t bpc = par->bits_per_coded_sample != 15 ? par->bits_per_coded_sample : 16; int64_t bpc = par->bits_per_coded_sample != 15 ? par->bits_per_coded_sample : 16;
int expected_stride = ((par->width * bpc + 31) >> 5)*4; int expected_stride = ((par->width * bpc + 31) >> 5)*4;
ret = ff_reshuffle_raw_rgb(s, &pkt, par, expected_stride); reshuffle_ret = ff_reshuffle_raw_rgb(s, &pkt, par, expected_stride);
if (ret < 0) if (reshuffle_ret < 0)
return ret; return reshuffle_ret;
} else } else
ret = 0; reshuffle_ret = 0;
if (par->format == AV_PIX_FMT_PAL8) { if (par->format == AV_PIX_FMT_PAL8) {
int ret2 = ff_get_packet_palette(s, opkt, ret, avist->palette); int ret2 = ff_get_packet_palette(s, opkt, reshuffle_ret, avist->palette);
if (ret2 < 0) if (ret2 < 0)
return ret2; return ret2;
if (ret2) { if (ret2) {
@ -752,7 +753,6 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
avi_stream2fourcc(tag, stream_index, par->codec_type); avi_stream2fourcc(tag, stream_index, par->codec_type);
tag[2] = 'p'; tag[3] = 'c'; tag[2] = 'p'; tag[3] = 'c';
if (s->pb->seekable) { if (s->pb->seekable) {
int ret;
if (avist->strh_flags_offset) { if (avist->strh_flags_offset) {
int64_t cur_offset = avio_tell(pb); int64_t cur_offset = avio_tell(pb);
avio_seek(pb, avist->strh_flags_offset, SEEK_SET); avio_seek(pb, avist->strh_flags_offset, SEEK_SET);
@ -778,7 +778,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
} }
} }
} }
if (ret) { if (reshuffle_ret) {
ret = avi_write_packet_internal(s, pkt); ret = avi_write_packet_internal(s, pkt);
av_packet_free(&pkt); av_packet_free(&pkt);
return ret; return ret;

Loading…
Cancel
Save