aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h264.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-08We really only need one range_foreach routine.Guy Harris1-4/+4
Rename range_foreach_r() to range_foreach(), getting rid of the old range_foreach(). If your callback doesn't require an additional argument, just pass NULL when calling range_foreach(), and declare the argument as unused. Change-Id: I49a56f90610e39cf2ddc398c9e30ed11a6ca90db Reviewed-on: https://code.wireshark.org/review/23025 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-4/+4
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-07Convert range API to always use wmem memory.Michael Mann1-2/+2
This is mostly to address memory leaks in range preferences (the biggest user of range functionality) on shutdown. Now range preferences must use epan scoped memory when referencing internal preference structures to keep consistency. Change-Id: Idc644f59b5b42fa1d46891542b53ff13ea754157 Reviewed-on: https://code.wireshark.org/review/19387 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-31Dissectors don't need a journey of self discovery.Michael Mann1-3/+3
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-14Rename new_dissector_t to dissector_t.Guy Harris1-1/+1
There are no longer any "old" dissectors, so "new_" is redundant. Change-Id: I5fee51228c2a8562166f5991e1f30c2c697e45c8 Reviewed-on: https://code.wireshark.org/review/13273 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-14register_dissector -> new_register_dissectorMichael Mann1-11/+12
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I25fe6a0aac93980333217d007702799d16946563 Reviewed-on: https://code.wireshark.org/review/11816 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-27Comment out various 'if(tree)'Bill Meier1-1/+1
col..._() and/or expert...() should not be called under 'if(tree)' Change-Id: I57efe44794977d3f93e4764642b091044a125c0c Reviewed-on: https://code.wireshark.org/review/6826 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-08Eliminate proto_tree_add_text from some dissectors.Michael Mann1-12/+25
Change-Id: Ief4c377d56748e1a8ed0ef7fe5ba03b9be00cd8d Reviewed-on: https://code.wireshark.org/review/6267 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-23Deleting unneccessary #includes from dissectors.Martin Mathieson1-2/+0
Second batch (packet-eth.c -> packet-icmpv6.d). Will look at cleaning up and committing script afterwards. Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594 Reviewed-on: https://code.wireshark.org/review/6013 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-4/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-2/+2
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-02Fix instances of duplicate display-filter-names with incompatible types.Bill Meier1-8/+8
Change-Id: I3b5afb8a59f6443624708b9fecfdcbe93dad59ef Note: Some of the filters, when/if used, could have caused Wireshark crashes. Reviewed-on: https://code.wireshark.org/review/5575 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-03tvb_length -> tvb_reported_lengthAndersBroman1-6/+6
Change-Id: I48b618008c8c8accd6f161bdc42e02906a4765b7 Reviewed-on: https://code.wireshark.org/review/5085 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-19Add editor modelines; Adjust indentation as needed.Bill Meier1-1/+12
Change-Id: Ie8d4056ab706bbc85c8247682b1a64ea98bc89f2 Reviewed-on: https://code.wireshark.org/review/4185 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19Do encoding-arg changes (all benign)Bill Meier1-10/+10
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Also: - FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...) - Change one case of incorrect '||' to '|' Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0 Reviewed-on: https://code.wireshark.org/review/4184 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-09h264: Remove unneeded errata checks.Britt McKinley1-48/+9
Some Microsoft errata were caused by bad decoding and were not actually problems. Remove the unneeded tests and expert information. Add PRID ranges values to Layer Presence bytes. Change-Id: I0b2b555bc448f0b4ee142b2920ae4e37d54ccab4 Reviewed-on: https://code.wireshark.org/review/2958 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+1
Change-Id: Idc6e9cf8f7f4b8e18a50723acbe5dee4c8cb786c Reviewed-on: https://code.wireshark.org/review/2934 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06H264: mark a parameter as unusedPascal Quantin1-1/+1
Change-Id: I564a0fefc263d909c9e478b64c5a816756d97377 Reviewed-on: https://code.wireshark.org/review/2902 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06H264: Add support of packetization modes, SVC, MS-H264Britt McKinley1-34/+955
Add support for Prefix, STAP, MTAP, NI-MTAP, and PACSI packet types. Add support for Microsoft SEI messages [MS-H264PF] Add support for dissecting scalable profiles SDP: Add profile-level-id decode for payload type H264-SVC MS-H264PF: http://msdn.microsoft.com/en-us/library/hh659565.aspx Update #1 - Fix Tabs -> Spaces, Reinsert accidentally removed entry 19 from h264_type_values Update #2 - Changed to using expert info for exceptions and Microsoft errata. Update #3: - Correct handling of truncated packets - Use guid functions and compare techniques - Correct ranges for expert info messages - Change to using reported_length from captured_length Change-Id: I520a3c9a6d85c78a976b520cf5a6a405064a48f1 Reviewed-on: https://code.wireshark.org/review/2580 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-28convert to proto_tree_add_subtree[_format]Michael Mann1-8/+5
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b Reviewed-on: https://code.wireshark.org/review/2676 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-6/+6
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-6/+6
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-01-12Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9633 :Pascal Quantin1-2/+2
Do not try to add a new NAL unit when the previous one was not decoded svn path=/trunk/; revision=54707
2013-12-17Make local functions static. Include *.h when needed.Anders Broman1-1/+3
svn path=/trunk/; revision=54164
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-2/+3
svn path=/trunk/; revision=54135
2013-12-12Reject the packet if data is NULL. Remove _U_ where data is actually used. ↵Chris Maynard1-5/+18
For now, leave the DISSECTOR_ASSERT's since both get_rose_ctx() and get_asn1_ctx() also check signatures. (Arguably it's the responsibility of the dissector passing this information to set the signature correctly so if there's an invalid signature, the bug is with the calling dissector and not with the one receiving the invalid signature.) svn path=/trunk/; revision=53964
2013-11-03Make Mac OS X buildbot happy (Missing _U_)Alexis La Goutte1-1/+1
svn path=/trunk/; revision=53056
2013-11-03Have asn1_ctx_t passed into the "h245.gef.name" and "h245.gef.content" ↵Michael Mann1-10/+9
subdissectors instead of using pinfo->private_data. svn path=/trunk/; revision=53055
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-08-19Change some dissectors to use pinfo memory pool instead of malloc if it can ↵Pascal Quantin1-4/+3
trigger an exception between between buffer allocation and tvb_set_free_cb call svn path=/trunk/; revision=51427
2013-07-16Convert some proto_tree_add_text into proto_tree_add_expert.Michael Mann1-16/+23
svn path=/trunk/; revision=50676
2013-03-29Rename value string (and similar) functions to use a consistent pattern. ThisEvan Huus1-1/+1
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
2013-03-19From beroset:Anders Broman1-2/+2
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48426
2013-02-26it's ==> its & its ==> it's as needed.Bill Meier1-1/+1
svn path=/trunk/; revision=47891
2013-01-31Comment out unused hf[] entries & etc.Bill Meier1-2/+6
(found by checkhf) svn path=/trunk/; revision=47389
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-5/+5
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-16- Don't call col...() under 'if (tree)';Bill Meier1-2343/+2333
- Move proto_reg_handoff...() to the end of the file; - Remove some uneeded variable initialization; - Use consistent indentation (e.g., no 4 space tabs) and whitespace formatting. svn path=/trunk/; revision=44541
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-6/+6
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-05-11Get rid of non-ASCII character.Guy Harris1-1/+1
svn path=/trunk/; revision=42569
2012-05-11Correct wrong value in h264_level_bitrate_valuesAnders Broman1-5/+6
svn path=/trunk/; revision=42559
2012-03-22Unescape NAL unitsAnders Broman1-7/+61
Bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6975 svn path=/trunk/; revision=41739
2011-10-24Fix encoding arg for various fcn calls:Bill Meier1-6/+6
- proto_tree_add_bits_item - proto_tree_add_bits_ret_val - proto_tree_add_bitmask - tvb_get_bits - tvb_get_bits16 - tvb_get_bits24 - tvb_get_bits32 - tvb_get_bits64 svn path=/trunk/; revision=39539
2011-09-27Get rid of check_col, while at it set ENC.Anders Broman1-85/+83
svn path=/trunk/; revision=39164
2011-08-08Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...Bill Meier1-2/+0
svn path=/trunk/; revision=38413
2011-04-18Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-4/+5
svn path=/trunk/; revision=36702