aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-15 12:34:55 +0100
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-26 14:41:33 +0100
commitca1a2a471156347b0d8351d0861c483d355276cc (patch)
tree756e7f1216495d966b825125c97baf91176ef7b9
parent0c55c6d30e0aa07b47645fafc6a817dfbfa2e85b (diff)
downloadffmpeg-ca1a2a471156347b0d8351d0861c483d355276cc.tar.gz
lavf: make compute_pkt_fields2() return meaningful error values
-rw-r--r--libavformat/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ff810a5541..9399bcbce5 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2931,7 +2931,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) {
@@ -2966,11 +2966,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);