@@ -971,7 +971,7 @@ static int mpegts_init(AVFormatContext *s)
av_guess_format((ts->flags & MPEGTS_FLAG_AAC_LATM) ? "latm" : "adts",
NULL, NULL);
if (!ts_st->amux->oformat) {
- ret = AVERROR(EINVAL);
+ ret = AVERROR_MUXER_NOT_FOUND;
goto fail;
}
if (!(ast = avformat_new_stream(ts_st->amux, NULL))) {
@@ -160,15 +160,15 @@ int avformat_alloc_output_context2(AVFormatContext **avctx, ff_const59 AVOutputF
oformat = av_guess_format(format, NULL, NULL);
if (!oformat) {
av_log(s, AV_LOG_ERROR, "Requested output format '%s' is not a suitable output format\n", format);
- ret = AVERROR(EINVAL);
+ ret = AVERROR_MUXER_NOT_FOUND;
goto error;
}
} else {
oformat = av_guess_format(NULL, filename, NULL);
if (!oformat) {
- ret = AVERROR(EINVAL);
av_log(s, AV_LOG_ERROR, "Unable to find a suitable output format for '%s'\n",
filename);
+ ret = AVERROR_MUXER_NOT_FOUND;
goto error;
}
}
@@ -36,7 +36,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
AVDictionary *opts = NULL;
if (!rtp_format) {
- ret = AVERROR(ENOSYS);
+ ret = AVERROR_MUXER_NOT_FOUND;
goto fail;
}
@@ -54,7 +54,7 @@ static int rtp_mpegts_write_header(AVFormatContext *s)
AVStream *st;
if (!mpegts_format || !rtp_format)
- return AVERROR(ENOSYS);
+ return AVERROR_MUXER_NOT_FOUND;
mpegts_ctx = avformat_alloc_context();
if (!mpegts_ctx)
return AVERROR(ENOMEM);
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/mpegtsenc.c | 2 +- libavformat/mux.c | 4 ++-- libavformat/rtpenc_chain.c | 2 +- libavformat/rtpenc_mpegts.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)