Lines Matching refs:jpeg
64 static void jpeg_close_context(PayloadContext *jpeg) in jpeg_close_context() argument
66 ffio_free_dyn_buf(&jpeg->frame); in jpeg_close_context()
214 static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg, in jpeg_parse_packet() argument
285 if (jpeg->qtables_len[q - 128] && in jpeg_parse_packet()
286 (jpeg->qtables_len[q - 128] != qtable_len || in jpeg_parse_packet()
287 memcmp(qtables, &jpeg->qtables[q - 128][0], qtable_len))) { in jpeg_parse_packet()
290 } else if (!jpeg->qtables_len[q - 128] && qtable_len <= 128) { in jpeg_parse_packet()
291 memcpy(&jpeg->qtables[q - 128][0], qtables, in jpeg_parse_packet()
293 jpeg->qtables_len[q - 128] = qtable_len; in jpeg_parse_packet()
302 if (!jpeg->qtables_len[q - 128]) { in jpeg_parse_packet()
307 qtables = &jpeg->qtables[q - 128][0]; in jpeg_parse_packet()
308 qtable_len = jpeg->qtables_len[q - 128]; in jpeg_parse_packet()
322 ffio_free_dyn_buf(&jpeg->frame); in jpeg_parse_packet()
324 if ((ret = avio_open_dyn_buf(&jpeg->frame)) < 0) in jpeg_parse_packet()
326 jpeg->timestamp = *timestamp; in jpeg_parse_packet()
331 jpeg->hdr_size = jpeg_create_header(hdr, sizeof(hdr), type, width, in jpeg_parse_packet()
336 avio_write(jpeg->frame, hdr, jpeg->hdr_size); in jpeg_parse_packet()
339 if (!jpeg->frame) { in jpeg_parse_packet()
345 if (jpeg->timestamp != *timestamp) { in jpeg_parse_packet()
348 ffio_free_dyn_buf(&jpeg->frame); in jpeg_parse_packet()
353 if (off != avio_tell(jpeg->frame) - jpeg->hdr_size) { in jpeg_parse_packet()
360 avio_write(jpeg->frame, buf, len); in jpeg_parse_packet()
367 avio_write(jpeg->frame, buf, sizeof(buf)); in jpeg_parse_packet()
370 if ((ret = ff_rtp_finalize_packet(pkt, &jpeg->frame, st->index)) < 0) { in jpeg_parse_packet()