<div dir="ltr">I'm trying to send extra data attached to each packet<div>In the encoding side , this is the code segment:</div><div>.....</div><div><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"> <span style="color:rgb(0,0,128);font-weight:bold">int </span>size = <span style="color:rgb(0,0,255)">35</span>;<br> <span style="color:rgb(0,0,128);font-weight:bold">char </span>* value = <span style="color:rgb(0,128,0);font-weight:bold">"xxx1,2,3,4,5,6,.7,8.8,9.9,10.12345,"</span>;<span style="color:rgb(128,128,128);font-style:italic"><br></span><span style="color:rgb(128,128,128);font-style:italic"> </span>av_packet_add_side_data(&pkt, <span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">AV_PKT_DATA_NEW_EXTRADATA</span>,(<span style="color:rgb(55,31,128)">uint8_t</span>*) value, size);</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"><pre style="font-family:"DejaVu Sans Mono";font-size:9pt">av_write_frame(<span style="color:rgb(102,14,122)">m_mux_ctx</span>, &pkt);</pre></pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">...</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">in the decoding side :</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">....</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"><pre style="font-family:"DejaVu Sans Mono";font-size:9pt"><span style="color:rgb(55,31,128)">uint8_t </span>*side_data = <span style="color:rgb(31,84,46);font-weight:bold">NULL</span>;<br></pre><pre style="font-family:"DejaVu Sans Mono";font-size:9pt"><span style="font-size:9pt;color:rgb(0,0,128);font-weight:bold">int </span><span style="font-size:9pt">side_data_size = </span><span style="font-size:9pt;color:rgb(0,0,255)">0</span><span style="font-size:9pt">;</span></pre><pre style="font-family:"DejaVu Sans Mono";font-size:9pt">side_data = av_packet_get_side_data(&packet,<span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">AV_PKT_DATA_NEW_EXTRADATA</span>,&side_data_size);<br><span style="color:rgb(0,0,128);font-weight:bold">if </span>(side_data && side_data_size >= <span style="color:rgb(0,0,255)">10</span>)<br>        <span style="color:rgb(0,128,128)">std</span>::cout<span style="color:rgb(0,128,128)"><< </span><span style="color:rgb(0,128,0);font-weight:bold">"side_data size="</span><span style="color:rgb(0,128,128)"><<</span>side_data_size <span style="color:rgb(0,128,128)"><<</span><span style="color:rgb(0,128,0);font-weight:bold">"</span><span style="color:rgb(0,0,128);font-weight:bold">\n</span><span style="color:rgb(0,128,0);font-weight:bold">"</span>;</pre><pre style="font-family:"DejaVu Sans Mono";font-size:9pt"><br></pre></pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">....</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"><br></pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">Input #0, matroska,webm, from 'tcp://<a href="http://192.168.100.86:8090">192.168.100.86:8090</a>':<br>  Metadata:<br>    ENCODER         : Lavf58.20.100<br>  Duration: N/A, bitrate: N/A<br>    Stream #0:0: Video: h264, none, 640x480, 1k tbn (default)<br>    Metadata:<br>      ENCODER         : omxcv f64c048 2019-08-12 18:00:42 +1000<br>      SETTINGS        : Created at Wed Apr  8 22:25:41 2020<br>                      : Bitrate: 4000 Kbps<br>        Codec h264 ID 27 bit_rate 27<br></pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"><br></pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">But i'm not receiving any side data?</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">Is there any missing option , or setting ? </pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt">I'm still new at discovering libav , thanks in advance.</pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"> </pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"><br></pre><pre style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt"><br></pre></div></div>