History

avformat/mux: Unify setting number of muxed packets

Andreas Rheinhardt committed 6 years ago

Commit fa5bff61 parent 5c5ab881 file · +3 −10Browse files

Unified · Split

libavformat/mux.c+3−10
@@ -763,7 +763,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) · 762 unmodified lines
763 if (ret < 0) {763 if (ret < 0) {
764 pkt->pts = pts_backup;764 pkt->pts = pts_backup;
765 pkt->dts = dts_backup;765 pkt->dts = dts_backup;
766 }766 } else
767 s->streams[pkt->stream_index]->nb_frames++;
767 768
768 return ret;769 return ret;
769}770}
@@ -912,11 +913,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt) · 142 unmodified lines
912 return ret;913 return ret;
913#endif914#endif
914 915
915 ret = write_packet(s, pkt);916 return write_packet(s, pkt);
916
917 if (ret >= 0)
918 s->streams[pkt->stream_index]->nb_frames++;
919 return ret;
920}917}
921 918
922#define CHUNK_START 0x1000919#define CHUNK_START 0x1000
@@ -1237,8 +1234,6 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt) · 314 unmodified lines
1237 return ret;1234 return ret;
1238 1235
1239 ret = write_packet(s, &opkt);1236 ret = write_packet(s, &opkt);
1240 if (ret >= 0)
1241 s->streams[opkt.stream_index]->nb_frames++;
1242 1237
1243 av_packet_unref(&opkt);1238 av_packet_unref(&opkt);
1244 1239
@@ -1263,8 +1258,6 @@ int av_write_trailer(AVFormatContext *s) · 18 unmodified lines
1263 break;1258 break;
1264 1259
1265 ret = write_packet(s, &pkt);1260 ret = write_packet(s, &pkt);
1266 if (ret >= 0)
1267 s->streams[pkt.stream_index]->nb_frames++;
1268 1261
1269 av_packet_unref(&pkt);1262 av_packet_unref(&pkt);
1270 1263

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