diff options
author | Jiri Novak <j.novak@netsystem.cz> | 2018-06-21 15:16:03 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-06-25 14:16:26 +0000 |
commit | 87973bf516432756f6948e969dbe9d6aa8a27017 (patch) | |
tree | 121c07a3ba525f05e44fcb75ad1b6f7b110a6227 /ui/qt/rtp_analysis_dialog.cpp | |
parent | 59c0b48d0aee24dc4efa32b459ef2822a6e52c07 (diff) |
RTP: Common functions for allocation/deallocation of rtpstream_info_t
Change-Id: I9a0a11d238473a7c57d85547dca0713ed421a500
Reviewed-on: https://code.wireshark.org/review/28417
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/rtp_analysis_dialog.cpp')
-rw-r--r-- | ui/qt/rtp_analysis_dialog.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp index 3f3340b0c4..9269c0e3a9 100644 --- a/ui/qt/rtp_analysis_dialog.cpp +++ b/ui/qt/rtp_analysis_dialog.cpp @@ -346,10 +346,10 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, rtpstream ui->buttonBox->button(QDialogButtonBox::Save)->setMenu(save_menu); if (stream_fwd) { // XXX What if stream_fwd == 0 && stream_rev != 0? - fwd_statinfo_ = *stream_fwd; + rtpstream_info_copy_deep(&fwd_statinfo_, stream_fwd); num_streams_=1; if (stream_rev) { - rev_statinfo_ = *stream_rev; + rtpstream_info_copy_deep(&rev_statinfo_, stream_rev); num_streams_=2; } } else { @@ -381,8 +381,8 @@ RtpAnalysisDialog::~RtpAnalysisDialog() { delete ui; // remove_tap_listener_rtpstream(&tapinfo_); - rtpstream_id_free(&(fwd_statinfo_.id)); - rtpstream_id_free(&(rev_statinfo_.id)); + rtpstream_info_free_data(&fwd_statinfo_); + rtpstream_info_free_data(&rev_statinfo_); delete fwd_tempfile_; delete rev_tempfile_; } @@ -1007,15 +1007,15 @@ void RtpAnalysisDialog::showPlayer() // XXX We might want to create an "rtp_stream_id_t" struct with only // addresses, ports & SSRC. - memset(&stream_info, 0, sizeof(stream_info)); + rtpstream_info_init(&stream_info); rtpstream_id_copy(&fwd_statinfo_.id, &stream_info.id); stream_info.packet_count = fwd_statinfo_.packet_count; stream_info.setup_frame_number = fwd_statinfo_.setup_frame_number; nstime_copy(&stream_info.start_rel_time, &fwd_statinfo_.start_rel_time); - rtp_player_dialog.addRtpStream(&stream_info); + if (num_streams_ > 1) { - memset(&stream_info, 0, sizeof(stream_info)); + rtpstream_info_init(&stream_info); rtpstream_id_copy(&rev_statinfo_.id, &stream_info.id); stream_info.packet_count = rev_statinfo_.packet_count; stream_info.setup_frame_number = rev_statinfo_.setup_frame_number; |