* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/avassert.h"
-#include "libavutil/common.h"
-#include "libavutil/avutil.h"
#include "avcodec.h"
-#include "libavutil/imgutils.h"
-#include "internal.h"
-
#include "davs2.h"
typedef struct DAVS2Context {
if (!cad->decoder) {
av_log(avctx, AV_LOG_ERROR, "decoder created error.");
- return AVERROR(EINVAL);
+ return AVERROR_EXTERNAL;
}
av_log(avctx, AV_LOG_VERBOSE, "decoder created. %p\n", cad->decoder);
if (!frame->buf[plane]){
av_log(avctx, AV_LOG_ERROR, "dump error: alloc failed.\n");
- return AVERROR(EINVAL);
+ return AVERROR(ENOMEM);
}
frame->data[plane] = frame->buf[plane]->data;
if (ret == DAVS2_ERROR) {
av_log(avctx, AV_LOG_ERROR, "Decoder error: can't read packet\n");
- return AVERROR(EINVAL);
+ return AVERROR_EXTERNAL;
}
ret = davs2_decoder_recv_frame(cad->decoder, &cad->headerset, &cad->out_frame);