| 1079 | } |
| 1080 | |
| 1081 | av_cold enum ThreadingStatus ff_thread_sync_ref(AVCodecContext *avctx, size_t offset) |
| 1082 | { |
| 1083 | PerThreadContext *p; |
| 1084 | const void *ref; |
| 1085 | |
| 1086 | if (!avctx->internal->is_copy) |
| 1087 | return avctx->active_thread_type & FF_THREAD_FRAME ? |
| 1088 | FF_THREAD_IS_FIRST_THREAD : FF_THREAD_NO_FRAME_THREADING; |
| 1089 | |
| 1090 | p = avctx->internal->thread_ctx; |
| 1091 | |
| 1092 | av_assert1(memcpy(&ref, (char*)avctx->priv_data + offset, sizeof(ref)) && ref == NULL); |
| 1093 | |
| 1094 | memcpy(&ref, (const char*)p->parent->threads[0].avctx->priv_data + offset, sizeof(ref)); |
| 1095 | av_assert1(ref); |
| 1096 | av_refstruct_replace((char*)avctx->priv_data + offset, ref); |
| 1097 | |
| 1098 | return FF_THREAD_IS_COPY; |
| 1099 | } |
| 1100 | |
| 1101 | int ff_thread_get_packet(AVCodecContext *avctx, AVPacket *pkt) |
| 1102 | { |
nothing calls this directly
no test coverage detected