It is implemented just for the mpegvideo encoder, it has fringe uses
and stops being functional once the encoder is multithreaded.
---
 libavcodec/avcodec.h       | 10 ++++------
 libavcodec/mpegvideo_enc.c | 13 -------------
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index e368d6b..879478d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2364,12 +2364,10 @@ typedef struct AVCodecContext {
      */
     int64_t timecode_frame_start;
 
-    /* The RTP callback: This function is called    */
-    /* every time the encoder has a packet to send. */
-    /* It depends on the encoder if the data starts */
-    /* with a Start Code (it should). H.263 does.   */
-    /* mb_nb contains the number of macroblocks     */
-    /* encoded in the RTP payload.                  */
+    /**
+     * @deprecated Unused
+     */
+    attribute_deprecated
     void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, 
int mb_nb);
 
     int rtp_payload_size;   /* The size of the RTP payload: the coder will  */
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index ab4fb32..29dc3df 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2710,10 +2710,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
                         }
                     }
 
-                    if (s->avctx->rtp_callback){
-                        int number_mb = (mb_y - s->resync_mb_y)*s->mb_width + 
mb_x - s->resync_mb_x;
-                        s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, 
current_packet_size, number_mb);
-                    }
                     update_mb_info(s, 1);
 
                     switch(s->codec_id){
@@ -3188,15 +3184,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
 
     write_slice_end(s);
 
-    /* Send the last GOB if RTP */
-    if (s->avctx->rtp_callback) {
-        int number_mb = (mb_y - s->resync_mb_y)*s->mb_width - s->resync_mb_x;
-        pdif = put_bits_ptr(&s->pb) - s->ptr_lastgob;
-        /* Call the RTP callback to send the last GOB */
-        emms_c();
-        s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb);
-    }
-
     return 0;
 }
 
-- 
2.5.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to