mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
avformat/mpegtsenc: move around setting m2ts_mode
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
565dc3e451
commit
db63db3977
@ -850,6 +850,14 @@ static int mpegts_init(AVFormatContext *s)
|
|||||||
int *pids;
|
int *pids;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (ts->m2ts_mode == -1) {
|
||||||
|
if (av_match_ext(s->url, "m2ts")) {
|
||||||
|
ts->m2ts_mode = 1;
|
||||||
|
} else {
|
||||||
|
ts->m2ts_mode = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (s->max_delay < 0) /* Not set by the caller */
|
if (s->max_delay < 0) /* Not set by the caller */
|
||||||
s->max_delay = 0;
|
s->max_delay = 0;
|
||||||
|
|
||||||
@ -1002,14 +1010,6 @@ static int mpegts_init(AVFormatContext *s)
|
|||||||
av_rescale(ts->sdt_period, 1000, PCR_TIME_BASE),
|
av_rescale(ts->sdt_period, 1000, PCR_TIME_BASE),
|
||||||
av_rescale(ts->pat_period, 1000, PCR_TIME_BASE));
|
av_rescale(ts->pat_period, 1000, PCR_TIME_BASE));
|
||||||
|
|
||||||
if (ts->m2ts_mode == -1) {
|
|
||||||
if (av_match_ext(s->url, "m2ts")) {
|
|
||||||
ts->m2ts_mode = 1;
|
|
||||||
} else {
|
|
||||||
ts->m2ts_mode = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user