History

avcodec/decode: Reindentation

Andreas Rheinhardt committed 5 years ago

Commit 03641881 parent cc448f81 file · +24 −25Browse files

Unified · Split

libavcodec/decode.c+24−25
@@ -1723,7 +1723,6 @@ static int add_metadata_from_side_data(const AVPacket *avpkt, AVFrame *frame) · 1722 unmodified lines
17231723 int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
17241724 {
17251725 AVPacket *pkt = avctx->internal->last_pkt_props;
1726− int i;
17271726 static const struct {
17281727 enum AVPacketSideDataType packet;
17291728 enum AVFrameSideDataType frame;
@@ -1744,36 +1743,36 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) · 14 unmodified lines
17441743 av_fifo_generic_read(avctx->internal->pkt_props,
17451744 pkt, sizeof(*pkt), NULL);
17461745
1747− frame->pts = pkt->pts;
1746+ frame->pts = pkt->pts;
17481747 #if FF_API_PKT_PTS
17491748 FF_DISABLE_DEPRECATION_WARNINGS
1750− frame->pkt_pts = pkt->pts;
1749+ frame->pkt_pts = pkt->pts;
17511750 FF_ENABLE_DEPRECATION_WARNINGS
17521751 #endif
1753− frame->pkt_pos = pkt->pos;
1754− frame->pkt_duration = pkt->duration;
1755− frame->pkt_size = pkt->size;
1756−
1757− for (i = 0; i < FF_ARRAY_ELEMS(sd); i++) {
1758− buffer_size_t size;
1759− uint8_t *packet_sd = av_packet_get_side_data(pkt, sd[i].packet, &size);
1760− if (packet_sd) {
1761− AVFrameSideData *frame_sd = av_frame_new_side_data(frame,
1762− sd[i].frame,
1763− size);
1764− if (!frame_sd)
1765− return AVERROR(ENOMEM);
1766−
1767− memcpy(frame_sd->data, packet_sd, size);
1768− }
1752+ frame->pkt_pos = pkt->pos;
1753+ frame->pkt_duration = pkt->duration;
1754+ frame->pkt_size = pkt->size;
1755+
1756+ for (int i = 0; i < FF_ARRAY_ELEMS(sd); i++) {
1757+ buffer_size_t size;
1758+ uint8_t *packet_sd = av_packet_get_side_data(pkt, sd[i].packet, &size);
1759+ if (packet_sd) {
1760+ AVFrameSideData *frame_sd = av_frame_new_side_data(frame,
1761+ sd[i].frame,
1762+ size);
1763+ if (!frame_sd)
1764+ return AVERROR(ENOMEM);
1765+
1766+ memcpy(frame_sd->data, packet_sd, size);
17691767 }
1770− add_metadata_from_side_data(pkt, frame);
1768+ }
1769+ add_metadata_from_side_data(pkt, frame);
17711770
1772− if (pkt->flags & AV_PKT_FLAG_DISCARD) {
1773− frame->flags |= AV_FRAME_FLAG_DISCARD;
1774− } else {
1775− frame->flags = (frame->flags & ~AV_FRAME_FLAG_DISCARD);
1776− }
1771+ if (pkt->flags & AV_PKT_FLAG_DISCARD) {
1772+ frame->flags |= AV_FRAME_FLAG_DISCARD;
1773+ } else {
1774+ frame->flags = (frame->flags & ~AV_FRAME_FLAG_DISCARD);
1775+ }
17771776 frame->reordered_opaque = avctx->reordered_opaque;
17781777
17791778 if (frame->color_primaries == AVCOL_PRI_UNSPECIFIED)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t