summaryrefslogtreecommitdiff
path: root/src/decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder.cc')
-rw-r--r--src/decoder.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/decoder.cc b/src/decoder.cc
index eae0f76..dfddd87 100644
--- a/src/decoder.cc
+++ b/src/decoder.cc
@@ -51,7 +51,7 @@ Decoder::Decoder(Error* err,
memset(&dvpars, 0, sizeof(dvpars));
if(!(iformat = av_find_input_format("dv1394"))) {
- errobj->setError("Failed to get input format dv1394");
+ errobj->pushError("Failed to get input format dv1394.");
exit(1);
}
@@ -60,23 +60,23 @@ Decoder::Decoder(Error* err,
dvpars.standard = "pal";
if(av_open_input_file(&ifc, "", iformat, 0, &dvpars) < 0) {
- errobj->setError("Device is in use.");
+ errobj->pushError("Device is in use.");
fc = NULL; return;
}
if(av_find_stream_info(ifc) < 0) {
- errobj->setError("Could not find enough parameters.");
+ errobj->pushError("Could not find enough parameters.");
fc = NULL; return;
}
dump_format(ifc, 1, "", 0);
if(!(dec_codec = avcodec_find_decoder(ifc->streams[0]->codec.codec_id))) {
- errobj->setError("Unsupported codec for input stream ");
+ errobj->pushError("Unsupported codec for input stream.");
fc = NULL; return;
}
if(avcodec_open(&ifc->streams[0]->codec, dec_codec) < 0) {
- errobj->setError("Error while opening codec for input stream");
+ errobj->pushError("Error while opening codec for input stream.");
fc = NULL; return;
}
@@ -92,7 +92,7 @@ Decoder::~Decoder()
void Decoder::decode()
{
if(fc == NULL) {
- errobj->setError("Decoder not initialized.");
+ errobj->pushError("Decoder not initialized.");
return;
}
@@ -125,7 +125,7 @@ void Decoder::decode()
fff->frame, &got_picture, ptr, len);
if(ret < 0) {
- errobj->setError("Error while decoding stream");
+ errobj->pushError("Error while decoding stream.");
exit(1);
}