diff options
author | Marton Balint <cus@passwd.hu> | 2021-11-22 02:56:05 +0300 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2021-11-25 21:11:24 +0300 |
commit | 0b9dbfab480004d7245013e1f9bf94c40a63f77f (patch) | |
tree | 6f513f48dfd0975955fcc93993efa469a757badc /libavformat | |
parent | 6f10f4a47948525174e654c9e312871dacdfc300 (diff) |
avformat/mpegts: fix stream index in verbose log message
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegts.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 29a267436f..36ab7ab3af 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2238,11 +2238,10 @@ static AVStream *find_matching_stream(MpegTSContext *ts, int pid, unsigned int p int stream_identifier, int pmt_stream_idx, struct Program *p) { AVFormatContext *s = ts->stream; - int i; AVStream *found = NULL; if (stream_identifier) { /* match based on "stream identifier descriptor" if present */ - for (i = 0; i < p->nb_streams; i++) { + for (int i = 0; i < p->nb_streams; i++) { if (p->streams[i].stream_identifier == stream_identifier) if (!found || pmt_stream_idx == i) /* fallback to idx based guess if multiple streams have the same identifier */ found = s->streams[p->streams[i].idx]; @@ -2255,7 +2254,7 @@ static AVStream *find_matching_stream(MpegTSContext *ts, int pid, unsigned int p av_log(ts->stream, AV_LOG_VERBOSE, "re-using existing %s stream %d (pid=0x%x) for new pid=0x%x\n", av_get_media_type_string(found->codecpar->codec_type), - i, found->id, pid); + found->index, found->id, pid); } return found; |