Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
QT: add same warning as GTK when trying to save a decoded RTP stream …
Browse files Browse the repository at this point in the history
…that is not alaw/ulaw

Change-Id: Ia11e58a20c879d1ca3ead8479f8082e204d92caf
Reviewed-on: https://code.wireshark.org/review/13131
Reviewed-by: Pascal Quantin <[email protected]>
  • Loading branch information
pquantin committed Jan 8, 2016
1 parent d3e480a commit af6768d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ui/qt/rtp_analysis_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit af6768d

Please sign in to comment.