[FFmpeg-devel] [PATCH 1/2] mux: make sure that the AV_PKT_DATA_H263_MB_INFO side data is received by the H.263/RTP packetizer (rfc2190)

Thomas Volkert silvo at gmx.net
Sun Sep 21 17:43:15 CEST 2014


From: Thomas Volkert <thomas at homer-conferencing.com>

---
 libavformat/mux.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 55add43..ef90466 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -586,6 +586,16 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
     }
 
     did_split = av_packet_split_side_data(pkt);
+   	
+   	/* make sure that the RTP packetizer (rfc2190) for H.263 gets the
+   	   needed side data by re-merging the side data again */
+    //FIXME: need a more reliable typing for AVOutputFormat instances
+  	if (did_split && pkt->side_data[0].type == AV_PKT_DATA_H263_MB_INFO &&
+  		strcmp(s->oformat->name, "rtp") != 0) {
+ 		av_packet_merge_side_data(pkt);
+ 		did_split = 0;
+  	}
+
     if ((pkt->flags & AV_PKT_FLAG_UNCODED_FRAME)) {
         AVFrame *frame = (AVFrame *)pkt->data;
         av_assert0(pkt->size == UNCODED_FRAME_PACKET_SIZE);
-- 
1.9.1



More information about the ffmpeg-devel mailing list