diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-01-07 16:31:19 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2016-01-08 15:54:27 +0000 |
commit | af6768d3ef6ae8d8f93f26d859df4cfb893454bf (patch) | |
tree | eec214af3a6cd630577afb1d7ec3a7d9e23166aa /ui/qt/rtp_analysis_dialog.cpp | |
parent | d3e480ac76c28c847b22fb2a10c6310c23357a94 (diff) |
QT: add same warning as GTK when trying to save a decoded RTP stream that is not alaw/ulaw
Change-Id: Ia11e58a20c879d1ca3ead8479f8082e204d92caf
Reviewed-on: https://code.wireshark.org/review/13131
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'ui/qt/rtp_analysis_dialog.cpp')
-rw-r--r-- | ui/qt/rtp_analysis_dialog.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp index 66ac236e94..25abf9927c 100644 --- a/ui/qt/rtp_analysis_dialog.cpp +++ b/ui/qt/rtp_analysis_dialog.cpp @@ -1062,6 +1062,16 @@ void RtpAnalysisDialog::saveAudio(RtpAnalysisDialog::StreamDirection direction) return; } + if (save_format == save_audio_au_) { + if ((((direction == dir_forward_) || (direction == dir_both_)) && + (fwd_statinfo_.pt != PT_PCMU) && (fwd_statinfo_.pt != PT_PCMA)) || + (((direction == dir_reverse_) || (direction == dir_both_)) && + (rev_statinfo_.pt != PT_PCMU) && (rev_statinfo_.pt != PT_PCMA))) { + QMessageBox::warning(this, tr("Warning"), tr("Can't save in a file: saving in au format supported only for alaw/ulaw streams")); + return; + } + } + QFile save_file(file_path); gint16 sample; gchar pd[4]; |