diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-03-15 12:34:55 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-06-09 23:00:11 +0200 |
commit | 996bbdbf1f5a031d38e8af3eac432bf8e2c72458 (patch) | |
tree | 967e2f6f82a0914a2beca890932007e2ac1b6851 | |
parent | 4654420410da643812b7b90fb39dd42e3a02bc53 (diff) | |
download | ffmpeg-996bbdbf1f5a031d38e8af3eac432bf8e2c72458.tar.gz |
lavf: make compute_pkt_fields2() return meaningful error values
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index c198af07ed..b189bfb622 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2867,7 +2867,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ pkt->pts, pkt->dts, st->cur_dts, delay, pkt->size, pkt->stream_index); /* if(pkt->pts == AV_NOPTS_VALUE && pkt->dts == AV_NOPTS_VALUE) - return -1;*/ + return AVERROR(EINVAL);*/ /* duration field */ if (pkt->duration == 0) { @@ -2902,11 +2902,11 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ av_log(s, AV_LOG_ERROR, "Application provided invalid, non monotonically increasing dts to muxer in stream %d: %"PRId64" >= %"PRId64"\n", st->index, st->cur_dts, pkt->dts); - return -1; + return AVERROR(EINVAL); } if(pkt->dts != AV_NOPTS_VALUE && pkt->pts != AV_NOPTS_VALUE && pkt->pts < pkt->dts){ av_log(s, AV_LOG_ERROR, "pts < dts in stream %d\n", st->index); - return -1; + return AVERROR(EINVAL); } // av_log(s, AV_LOG_DEBUG, "av_write_frame: pts2:%"PRId64" dts2:%"PRId64"\n", pkt->pts, pkt->dts); |