]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/roqaudioenc.c
hevc: pass the full HEVCNAL struct to decode_nal_unit
[ffmpeg] / libavcodec / roqaudioenc.c
index d440fbe9448c055aa3bff11203c6a65c6bf5af5c..402eb78be58ae52c1687fa2a728508503a2fba25 100644 (file)
@@ -147,15 +147,16 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             context->input_frames++;
             return 0;
         }
-        in = context->frame_buffer;
     }
+    if (context->input_frames < 8)
+        in = context->frame_buffer;
 
     if (stereo) {
         context->lastSample[0] &= 0xFF00;
         context->lastSample[1] &= 0xFF00;
     }
 
-    if (context->input_frames == 7 || !in)
+    if (context->input_frames == 7)
         data_size = avctx->channels * context->buffered_samples;
     else
         data_size = avctx->channels * avctx->frame_size;
@@ -193,6 +194,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
 AVCodec ff_roq_dpcm_encoder = {
     .name           = "roq_dpcm",
+    .long_name      = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_ROQ_DPCM,
     .priv_data_size = sizeof(ROQDPCMContext),
@@ -202,5 +204,4 @@ AVCodec ff_roq_dpcm_encoder = {
     .capabilities   = CODEC_CAP_DELAY,
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                      AV_SAMPLE_FMT_NONE },
-    .long_name      = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
 };