1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avformat/mpegtsenc: reindent the code

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2020-08-23 23:32:31 +08:00
parent 4aa6eda76e
commit 9bb4707b1f

View File

@ -1744,24 +1744,24 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_ERROR, "AAC bitstream not in ADTS format "
"and extradata missing\n");
} else {
av_init_packet(&pkt2);
pkt2.data = pkt->data;
pkt2.size = pkt->size;
av_assert0(pkt->dts != AV_NOPTS_VALUE);
pkt2.dts = av_rescale_q(pkt->dts, st->time_base, ts_st->amux->streams[0]->time_base);
av_init_packet(&pkt2);
pkt2.data = pkt->data;
pkt2.size = pkt->size;
av_assert0(pkt->dts != AV_NOPTS_VALUE);
pkt2.dts = av_rescale_q(pkt->dts, st->time_base, ts_st->amux->streams[0]->time_base);
ret = avio_open_dyn_buf(&ts_st->amux->pb);
if (ret < 0)
return ret;
ret = avio_open_dyn_buf(&ts_st->amux->pb);
if (ret < 0)
return ret;
ret = av_write_frame(ts_st->amux, &pkt2);
if (ret < 0) {
ffio_free_dyn_buf(&ts_st->amux->pb);
return ret;
}
size = avio_close_dyn_buf(ts_st->amux->pb, &data);
ts_st->amux->pb = NULL;
buf = data;
ret = av_write_frame(ts_st->amux, &pkt2);
if (ret < 0) {
ffio_free_dyn_buf(&ts_st->amux->pb);
return ret;
}
size = avio_close_dyn_buf(ts_st->amux->pb, &data);
ts_st->amux->pb = NULL;
buf = data;
}
}
} else if (st->codecpar->codec_id == AV_CODEC_ID_HEVC) {