]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpenc_jpeg.c
mss1: use the AVFrame API properly.
[ffmpeg] / libavformat / rtpenc_jpeg.c
index 53a5bd2238fc4d44d5b824ebf1e69bc97c342dfe..04df6583dfec2c4d37961be42e32428e71af40e5 100644 (file)
@@ -29,7 +29,7 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
     RTPMuxContext *s = s1->priv_data;
     const uint8_t *qtables = NULL;
     int nb_qtables = 0;
-    uint8_t type = 1; /* default pixel format is PIX_FMT_YUVJ420P */
+    uint8_t type = 1; /* default pixel format is AV_PIX_FMT_YUVJ420P */
     uint8_t w, h;
     uint8_t *p;
     int off = 0; /* fragment offset of the current JPEG frame */
@@ -44,9 +44,9 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
     h = s1->streams[0]->codec->height >> 3;
 
     /* check if pixel format is not the normal 420 case */
-    if (s1->streams[0]->codec->pix_fmt == PIX_FMT_YUVJ422P) {
+    if (s1->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUVJ422P) {
         type = 0;
-    } else if (s1->streams[0]->codec->pix_fmt == PIX_FMT_YUVJ420P) {
+    } else if (s1->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUVJ420P) {
         type = 1;
     } else {
         av_log(s1, AV_LOG_ERROR, "Unsupported pixel format\n");