Unified · Split
| @@ -817,7 +817,7 @@ int dec_packet(InputStream *ist, const AVPacket *pkt, int no_eof); · 816 unmodified lines | |||
| 817 | int enc_alloc(Encoder **penc, const AVCodec *codec); | 817 | int enc_alloc(Encoder **penc, const AVCodec *codec); |
| 818 | void enc_free(Encoder **penc); | 818 | void enc_free(Encoder **penc); |
| 819 | 819 | ||
| 820 | int enc_open(OutputStream *ost, AVFrame *frame); | 820 | int enc_open(OutputStream *ost, const AVFrame *frame); |
| 821 | int enc_subtitle(OutputFile *of, OutputStream *ost, const AVSubtitle *sub); | 821 | int enc_subtitle(OutputFile *of, OutputStream *ost, const AVSubtitle *sub); |
| 822 | int enc_frame(OutputStream *ost, AVFrame *frame); | 822 | int enc_frame(OutputStream *ost, AVFrame *frame); |
| 823 | int enc_flush(void); | 823 | int enc_flush(void); |
| @@ -165,7 +165,7 @@ static int set_encoder_id(OutputFile *of, OutputStream *ost) · 164 unmodified lines | |||
| 165 | return 0; | 165 | return 0; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | int enc_open(OutputStream *ost, AVFrame *frame) | 168 | int enc_open(OutputStream *ost, const AVFrame *frame) |
| 169 | { | 169 | { |
| 170 | InputStream *ist = ost->ist; | 170 | InputStream *ist = ost->ist; |
| 171 | Encoder *e = ost->enc; | 171 | Encoder *e = ost->enc; |
| @@ -183,9 +183,8 @@ int enc_open(OutputStream *ost, AVFrame *frame) · 11 unmodified lines | |||
| 183 | av_assert0(frame || (enc->type != AVMEDIA_TYPE_VIDEO && enc->type != AVMEDIA_TYPE_AUDIO)); | 183 | av_assert0(frame || (enc->type != AVMEDIA_TYPE_VIDEO && enc->type != AVMEDIA_TYPE_AUDIO)); |
| 184 | 184 | ||
| 185 | if (frame) { | 185 | if (frame) { |
| 186 | fd = frame_data(frame); | 186 | av_assert0(frame->opaque_ref); |
| 187 | if (!fd) | 187 | fd = (FrameData*)frame->opaque_ref->data; |
| 188 | return AVERROR(ENOMEM); | ||
| 189 | } | 188 | } |
| 190 | 189 | ||
| 191 | ret = set_encoder_id(output_files[ost->file_index], ost); | 190 | ret = set_encoder_id(output_files[ost->file_index], ost); |