From d4f7e94d5c0352ec29c58ff9dcda4f0ceac3b7d9 Mon Sep 17 00:00:00 2001 From: Luther Stickell Date: Fri, 21 Oct 2011 15:11:55 +0200 Subject: [PATCH] Source is not a valid %1% file --- src/input/r_avi.cpp | 2 +- src/input/r_corepicture.cpp | 2 +- src/input/r_ogm.cpp | 2 +- src/input/r_qtmp4.cpp | 2 +- src/input/r_real.cpp | 2 +- src/input/r_srt.cpp | 2 +- src/input/r_ssa.cpp | 2 +- src/input/r_usf.cpp | 2 +- src/input/r_wav.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/input/r_avi.cpp b/src/input/r_avi.cpp index 6c2eb1361..e27958b71 100644 --- a/src/input/r_avi.cpp +++ b/src/input/r_avi.cpp @@ -101,7 +101,7 @@ avi_reader_c::avi_reader_c(track_info_c &_ti) mm_file_io_c io(m_ti.m_fname); size = io.get_size(); if (!avi_reader_c::probe_file(&io, size)) - throw error_c(Y("avi_reader: Source is not a valid AVI file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); } catch (...) { throw error_c(Y("avi_reader: Could not read the source file.")); diff --git a/src/input/r_corepicture.cpp b/src/input/r_corepicture.cpp index 25b6a682c..91d10a6e1 100644 --- a/src/input/r_corepicture.cpp +++ b/src/input/r_corepicture.cpp @@ -69,7 +69,7 @@ corepicture_reader_c::corepicture_reader_c(track_info_c &_ti) m_xml_source = new mm_text_io_c(new mm_file_io_c(m_ti.m_fname)); if (!corepicture_reader_c::probe_file(m_xml_source, 0)) - throw error_c(Y("corepicture_reader: Source is not a valid CorePanorama file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); parse_xml_file(); diff --git a/src/input/r_ogm.cpp b/src/input/r_ogm.cpp index c50d0f430..ea2b7ae4a 100644 --- a/src/input/r_ogm.cpp +++ b/src/input/r_ogm.cpp @@ -329,7 +329,7 @@ ogm_reader_c::ogm_reader_c(track_info_c &_ti) throw error_c(boost::format(Y("%1%: Could not open the source file.")) % get_format_name()); } if (!ogm_reader_c::probe_file(io, file_size)) - throw error_c(Y("ogm_reader: Source is not a valid OGG media file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); ogg_sync_init(&oy); diff --git a/src/input/r_qtmp4.cpp b/src/input/r_qtmp4.cpp index 74bdc246d..a7336e371 100644 --- a/src/input/r_qtmp4.cpp +++ b/src/input/r_qtmp4.cpp @@ -118,7 +118,7 @@ qtmp4_reader_c::qtmp4_reader_c(track_info_c &_ti) file_size = io->getFilePointer(); io->setFilePointer(0, seek_beginning); if (!qtmp4_reader_c::probe_file(io, file_size)) - throw error_c(Y("Quicktime/MP4 reader: Source is not a valid Quicktime/MP4 file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); show_demuxer_info(); diff --git a/src/input/r_real.cpp b/src/input/r_real.cpp index be705e2fa..4920d8939 100644 --- a/src/input/r_real.cpp +++ b/src/input/r_real.cpp @@ -144,7 +144,7 @@ real_reader_c::real_reader_c(track_info_c &_ti) file = rmff_open_file_with_io(m_ti.m_fname.c_str(), RMFF_OPEN_MODE_READING, &mm_io_file_io); if (NULL == file) { if (RMFF_ERR_NOT_RMFF == rmff_last_error) - throw error_c(Y("real_reader: Source is not a valid RealMedia file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); else throw error_c(Y("real_reader: Could not read the source file.")); } diff --git a/src/input/r_srt.cpp b/src/input/r_srt.cpp index 299fb6714..804e06ddc 100644 --- a/src/input/r_srt.cpp +++ b/src/input/r_srt.cpp @@ -31,7 +31,7 @@ srt_reader_c::srt_reader_c(track_info_c &p_ti) try { m_io = mm_text_io_cptr(new mm_text_io_c(new mm_file_io_c(m_ti.m_fname))); if (!srt_parser_c::probe(m_io.get_object())) - throw error_c(Y("srt_reader: Source is not a valid SRT file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); m_ti.m_id = 0; // ID for this track. m_subs = srt_parser_cptr(new srt_parser_c(m_io.get_object(), m_ti.m_fname, 0)); diff --git a/src/input/r_ssa.cpp b/src/input/r_ssa.cpp index a17ff1d54..ca35665b4 100644 --- a/src/input/r_ssa.cpp +++ b/src/input/r_ssa.cpp @@ -41,7 +41,7 @@ ssa_reader_c::ssa_reader_c(track_info_c &_ti) } if (!ssa_reader_c::probe_file(io.get_object(), 0)) - throw error_c(Y("ssa_reader: Source is not a valid SSA/ASS file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); charset_converter_cptr cc_utf8 = map_has_key(m_ti.m_sub_charsets, 0) ? charset_converter_c::init(m_ti.m_sub_charsets[ 0]) : map_has_key(m_ti.m_sub_charsets, -1) ? charset_converter_c::init(m_ti.m_sub_charsets[-1]) diff --git a/src/input/r_usf.cpp b/src/input/r_usf.cpp index 8da83a6fd..bffed239e 100644 --- a/src/input/r_usf.cpp +++ b/src/input/r_usf.cpp @@ -72,7 +72,7 @@ usf_reader_c::usf_reader_c(track_info_c &_ti) size_t i; if (!usf_reader_c::probe_file(m_xml_source, 0)) - throw error_c(Y("usf_reader: Source is not a valid USF file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); parse_xml_file(); m_private_data += ""; diff --git a/src/input/r_wav.cpp b/src/input/r_wav.cpp index ec63decf5..edaeadded 100644 --- a/src/input/r_wav.cpp +++ b/src/input/r_wav.cpp @@ -463,7 +463,7 @@ wav_reader_c::wav_reader_c(track_info_c &ti_) } if (!wav_reader_c::probe_file(m_io.get_object(), size)) - throw error_c(Y("wav_reader: Source is not a valid WAVE file.")); + throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name()); parse_file(); create_demuxer();